2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pragma-pack-3.c
blobd38431491342651a1a479b84f5a24534ec4d64a5
1 /* PR c++/25294 */
2 /* { dg-options "-std=gnu99" } */
3 /* Epiphany makes struct S 8-byte aligned. */
4 /* { dg-do run { target { ! epiphany-*-* } } } */
6 extern void abort (void);
8 struct S
10 char a[3];
11 #pragma pack(1) /* A block comment
12 that ends on the next line. */
13 struct T
15 char b;
16 int c;
17 } d;
18 #pragma pack /*/ */ () // C++ comment
19 int e;
20 } s;
22 int
23 main ()
25 if (sizeof (int) == 4 && sizeof (s) != 12)
26 abort ();
27 return 0;