diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
commit | 676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch) | |
tree | 02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /test/CodeGen/designated-initializers.c | |
parent | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff) |
Diffstat (limited to 'test/CodeGen/designated-initializers.c')
-rw-r--r-- | test/CodeGen/designated-initializers.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/CodeGen/designated-initializers.c b/test/CodeGen/designated-initializers.c index 74532c8fa5b43..b29799dace205 100644 --- a/test/CodeGen/designated-initializers.c +++ b/test/CodeGen/designated-initializers.c @@ -142,6 +142,18 @@ union_16644_t union_16644_instance_4[2] = // CHECK: @lab = global { [4 x i8], i32 } { [4 x i8] undef, i32 123 } struct leading_anon_bitfield { int : 32; int n; } lab = { .n = 123 }; +// rdar://45691981 +struct Base { + struct { + int A; + }; +}; +struct Derived { + struct Base B; +}; +struct Derived D = {{}, .B.A = 42}; +// CHECK: @D = global %struct.Derived { %struct.Base { %struct.anon.4 { i32 42 } } }, align 4 + void test1(int argc, char **argv) { // CHECK: internal global %struct.foo { i8* null, i32 1024 } @@ -149,7 +161,7 @@ void test1(int argc, char **argv) .b = 1024, }; - // CHECK: bitcast %union.anon.4* %u2 + // CHECK: bitcast %union.anon.5* %u2 // CHECK: call void @llvm.memset union { int i; float f; } u2 = { }; |