* gcc.dg/20061124-1.c: Add exit() function prototype.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr17112-1.c
blob04d3a2e0e217f2d92a8024c7a334f4b5be7cef12
1 /* PR middle-end/17112 */
2 /* { dg-do run } */
3 /* { dg-require-effective-target int32plus } */
4 /* { dg-options "-O2" } */
6 extern void abort(void);
8 typedef struct {
9 int int24:24 __attribute__ ((packed)); /* { dg-warning "attribute ignored" "" { target { default_packed && { ! pcc_bitfield_type_matters } } } } */
10 } myint24;
12 myint24 x[3] = {
13 0x123456,
14 0x789abc,
15 0xdef012
18 myint24 y[3]; // starts out as zeros
20 void foo()
22 y[1] = x[1];
25 int main()
27 foo();
29 if (y[0].int24 != 0 || y[2].int24 != 0)
30 abort();
31 return 0;