[llvm-commits] [test-suite] r71103 - /test-suite/trunk/SingleSource/UnitTests/2009-04-16-BitfieldInitialization.c

Chris Lattner sabre at nondot.org
Wed May 6 11:56:27 PDT 2009


Author: lattner
Date: Wed May  6 13:56:27 2009
New Revision: 71103

URL: http://llvm.org/viewvc/llvm-project?rev=71103&view=rev
Log:
add testcase for rdar://6861719

Modified:
    test-suite/trunk/SingleSource/UnitTests/2009-04-16-BitfieldInitialization.c

Modified: test-suite/trunk/SingleSource/UnitTests/2009-04-16-BitfieldInitialization.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/2009-04-16-BitfieldInitialization.c?rev=71103&r1=71102&r2=71103&view=diff

==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/2009-04-16-BitfieldInitialization.c (original)
+++ test-suite/trunk/SingleSource/UnitTests/2009-04-16-BitfieldInitialization.c Wed May  6 13:56:27 2009
@@ -72,6 +72,21 @@
   int c : 16;
 } t9 = { 0, 123, 456 };
 
+// rdar://6861719
+#pragma pack(4)
+
+struct t10s {
+  short a;
+  int *b;
+};
+
+#pragma pack()
+
+int x = 42;
+struct t10s t10 = { 
+.b = &x
+};
+
 
 #include <stdio.h>
 
@@ -88,5 +103,6 @@
   printf("7a: %d %d %d\n", t7a.x, t7a.y, t7a.q);
   printf("8: %d %d\n", t8.what, t8.type);
   printf("9: %d %d\n", t9.b, t9.c);
+  printf("10: %d\n", *t10.b);
   return 0;
 }





More information about the llvm-commits mailing list