Merge reload-branch up to revision 101000
[official-gcc.git] / gcc / testsuite / gcc.dg / pr17112-1.c
blob7c8b7aa04320ed329fc653cf2459a5661b7730dc
1 /* PR middle-end/17112 */
2 /* { dg-do run } */
3 /* { dg-options "-O2" } */
5 extern void abort(void);
7 typedef struct {
8 int int24:24 __attribute__ ((packed));
9 } myint24;
11 myint24 x[3] = {
12 0x123456,
13 0x789abc,
14 0xdef012
17 myint24 y[3]; // starts out as zeros
19 void foo()
21 y[1] = x[1];
24 int main()
26 foo();
28 if (y[0].int24 != 0 || y[2].int24 != 0)
29 abort();
30 return 0;