[cfe-commits] r101539 - /cfe/trunk/test/CodeGen/designated-initializers.c

Nuno Lopes nunoplopes at sapo.pt
Fri Apr 16 14:19:40 PDT 2010


Author: nlopes
Date: Fri Apr 16 16:19:39 2010
New Revision: 101539

URL: http://llvm.org/viewvc/llvm-project?rev=101539&view=rev
Log:
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

Modified:
    cfe/trunk/test/CodeGen/designated-initializers.c

Modified: cfe/trunk/test/CodeGen/designated-initializers.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/designated-initializers.c?rev=101539&r1=101538&r2=101539&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/designated-initializers.c (original)
+++ cfe/trunk/test/CodeGen/designated-initializers.c Fri Apr 16 16:19:39 2010
@@ -11,6 +11,9 @@
 // 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





More information about the cfe-commits mailing list