[llvm-commits] [test-suite] r70182 - /test-suite/trunk/SingleSource/UnitTests/2006-01-23-UnionInit.c

Chris Lattner sabre at nondot.org
Sun Apr 26 21:49:30 PDT 2009


Author: lattner
Date: Sun Apr 26 23:49:30 2009
New Revision: 70182

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

Modified:
    test-suite/trunk/SingleSource/UnitTests/2006-01-23-UnionInit.c

Modified: test-suite/trunk/SingleSource/UnitTests/2006-01-23-UnionInit.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/2006-01-23-UnionInit.c?rev=70182&r1=70181&r2=70182&view=diff

==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/2006-01-23-UnionInit.c (original)
+++ test-suite/trunk/SingleSource/UnitTests/2006-01-23-UnionInit.c Sun Apr 26 23:49:30 2009
@@ -121,6 +121,22 @@
   return z;
 }
 
+
+//===- rdar://6828787 -----------------------------------------------------===//
+
+#pragma pack(4)
+
+struct foo2 {
+  short a;
+  long  x;
+  short y;
+};
+
+#pragma pack()
+
+struct foo2 foo2 = { 23122, -12312731, -312 };
+
+
 //===- Checker ------------------------------------------------------------===//
 
 int main() {
@@ -128,7 +144,7 @@
   spinlock_t lock;
   printf("PR156: %s\n", init_task_union.task.comm);
   printf("PR295/PR568: %d, %d\n", fixed_tl[0].word.pad, fixed_tl[0].base);
-  printf("PR574: %d, %d, %d, %d\n", bkv4.gv4.av4, cav1.dv1, cav1.ev1,
+  printf("PR574: %d, %d, %d, %d\n", (int)bkv4.gv4.av4, cav1.dv1, cav1.ev1,
          cav1.fv1[0]);
   printf("PR162: %d, %d, %d\n", V.X.A, V.X.B, V.C);
   printf("PR650: %s, %d\n", nd.data, nd.alignmentDummy);
@@ -141,8 +157,9 @@
   printf("PR654: %p, '%s'\n", s.inplace, s.chunk_data);
   printf("PR323: %d, '%s'\n", ai.lsk.agid, ai.lsk.key);
   lock = (spinlock_t) { .raw_lock = one_raw_spinlock() };
-  printf("PR627: %d\n", sizeof(lock));
+  printf("PR627: %d\n", (int)sizeof(lock));
   XX = ucast_test();
   printf("PR684: %d, %d, %d %d\n", XX.s.i1, XX.s.i2, XX.s.i3, XX.i);
+  printf("rdar://6828787: %d, %d, %d\n", foo2.a, foo2.x, foo2.y);
   return 0;
 }





More information about the llvm-commits mailing list