Revert DECL_USER_ALIGN part of r241959
[official-gcc.git] / gcc / testsuite / gcc.dg / 20020411-1.c
blob55ca2997c17cf634228c71e1273489d074924341
1 /* PR c/6223
2 This testcase ICEd in internal check because a constant was not truncated
3 for its mode. */
4 /* { dg-do compile } */
5 /* { dg-options "-O2" } */
6 /* { dg-options "-O2 -march=i686" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
8 #if __INT_MAX__ > 32767
10 typedef struct
12 unsigned a : 16;
13 unsigned b : 16;
14 unsigned c : 5;
15 unsigned d : 2;
16 unsigned e : 1;
17 unsigned f : 4;
18 unsigned g : 1;
19 unsigned h : 1;
20 unsigned i : 1;
21 unsigned j : 1;
22 } T;
24 inline void
25 foo (T *x, unsigned int y)
27 if ((x->j = (y >= 0x100000)))
28 y >>= 12;
29 x->a = y;
30 x->f = (y >> 16);
33 void __attribute__((noinline))
34 bar (T *x)
38 void
39 baz (unsigned int x, unsigned char y)
41 T t;
43 foo (&t, x - 1);
44 t.e = 1;
45 t.c = y;
46 t.g = 0;
47 t.h = 0;
48 t.i = (y & 0x40) != 0;
49 if (x == 1)
50 foo (&t, 1);
51 bar (&t);
54 #endif /* __INT_MAX__ */