diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2010-04-16 21:19:39 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2010-04-16 21:19:39 +0000 |
commit | 1c5c30fdd39ac1e730cb48156fc8d95224651f92 (patch) | |
tree | 2349effb4974157be2bab84f75ea805bd1329c57 /clang/test/CodeGen/designated-initializers.c | |
parent | d4758fc39373093873ca7ecfa52cd118f125615a (diff) | |
download | bcm5719-llvm-1c5c30fdd39ac1e730cb48156fc8d95224651f92.tar.gz bcm5719-llvm-1c5c30fdd39ac1e730cb48156fc8d95224651f92.zip |
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
llvm-svn: 101539
Diffstat (limited to 'clang/test/CodeGen/designated-initializers.c')
-rw-r--r-- | clang/test/CodeGen/designated-initializers.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/CodeGen/designated-initializers.c b/clang/test/CodeGen/designated-initializers.c index 1ad5e6c028a..49f57ad062c 100644 --- a/clang/test/CodeGen/designated-initializers.c +++ b/clang/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 |