aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/designated-initializers.c
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2010-04-16 21:19:39 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2010-04-16 21:19:39 +0000
commit69cf5de24740d25b8b63126911eb9ccb8672cb07 (patch)
treeb99de02df1cbbd75a46e2aadafa7d9dd9c948ddd /test/CodeGen/designated-initializers.c
parentd39a0d6119a3bf69e3e5149b778e825b77b2e06a (diff)
add another test for the undef patch just for to have peace of mind :)
this follows from C99 6.7.8p10: if it is a union, the first named member is initialized git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/designated-initializers.c')
-rw-r--r--test/CodeGen/designated-initializers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/CodeGen/designated-initializers.c b/test/CodeGen/designated-initializers.c
index 1ad5e6c028..49f57ad062 100644
--- a/test/CodeGen/designated-initializers.c
+++ b/test/CodeGen/designated-initializers.c
@@ -11,6 +11,9 @@ union { int i; float f; } u = { };
// CHECK: @u2 = global %0 { i32 0, [4 x i8] undef }
union { int i; double f; } u2 = { };
+// CHECK: @u3 = global %1 zeroinitializer
+union { double f; int i; } u3 = { };
+
// CHECK: @b = global [2 x i32] [i32 0, i32 22]
int b[2] = {
[1] = 22