llvm-project/clang/test/CodeGen/label-array-aggregate-init.c
Hans Wennborg 4a2757d80f Make globals used for array initialization codegen constant
As pointed out in D133835 these globals will never be written to
(they're only used for trivially copyable types), so they can always be
constant.

Differential revision: https://reviews.llvm.org/D146211
2023-03-17 09:23:34 +01:00

11 lines
273 B
C

// RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm %s -o - | FileCheck %s
// CHECK: @constinit = private constant [3 x ptr] [ptr blockaddress(@main, %L), ptr null, ptr null]
void receivePtrs(void **);
int main(void) {
L:
receivePtrs((void *[]){ &&L, 0, 0 });
}