PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr31448.c
blobfb8c2471a6d3efd032ccef44dceaf016fda4ce61
1 /* PR middle-end/31448, this used to ICE during expand because
2 reduce_to_bit_field_precision was not ready to handle constants. */
3 /* { dg-require-effective-target int32plus } */
5 typedef struct _st {
6 int iIndex : 24;
7 int iIndex1 : 24;
8 } st;
9 st *next;
10 void g(void)
12 st *next = 0;
13 int nIndx;
14 const static int constreg[] = { 0,};
15 nIndx = 0;
16 next->iIndex = constreg[nIndx];
18 void f(void)
20 int nIndx;
21 const static int constreg[] = { 0xFEFEFEFE,};
22 nIndx = 0;
23 next->iIndex = constreg[nIndx];
24 next->iIndex1 = constreg[nIndx];
26 int main(void)
28 st a;
29 next = &a;
30 f();
31 if (next->iIndex != 0xFFFEFEFE)
32 __builtin_abort ();
33 if (next->iIndex1 != 0xFFFEFEFE)
34 __builtin_abort ();
35 return 0;