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
This commit is contained in:
Nuno Lopes 2010-04-16 21:19:39 +00:00
parent d4758fc393
commit 1c5c30fdd3
1 changed files with 3 additions and 0 deletions

View File

@ -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