diff options
Diffstat (limited to 'clang/test/CodeGen/const-init.c')
-rw-r--r-- | clang/test/CodeGen/const-init.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGen/const-init.c b/clang/test/CodeGen/const-init.c index 7d7ccae370d..ccc6604c456 100644 --- a/clang/test/CodeGen/const-init.c +++ b/clang/test/CodeGen/const-init.c @@ -159,3 +159,14 @@ void g29() { static int b[1] = { "asdf" }; // expected-warning {{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char [5]'}} static int c[1] = { L"a" }; } + +// PR21300 +void g30() { +#pragma pack(1) + static struct { + int : 1; + int x; + } a = {}; + // CHECK: @g30.a = internal global %struct.anon.1 <{ i8 undef, i32 0 }>, align 1 +#pragma pack() +} |