* expmed.c (flip_storage_order): Deal with complex modes specially.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20050119-2.c
blob568109cb2c9bb6b219bf887e368af3ff9cc27e74
1 /* PR middle-end/19874 */
2 typedef enum { A, B, C, D } E;
4 struct S {
5 E __attribute__ ((mode (__byte__))) a;
6 E __attribute__ ((mode (__byte__))) b;
7 E __attribute__ ((mode (__byte__))) c;
8 E __attribute__ ((mode (__byte__))) d;
9 };
11 extern void abort (void);
12 extern void exit (int);
15 foo (struct S *s)
17 if (s->a != s->b)
18 abort ();
19 if (s->c != C)
20 abort ();
21 return s->d;
24 int
25 main (void)
27 struct S s[2];
28 s[0].a = B;
29 s[0].b = B;
30 s[0].c = C;
31 s[0].d = D;
32 s[1].a = D;
33 s[1].b = C;
34 s[1].c = B;
35 s[1].d = A;
36 if (foo (s) != D)
37 abort ();
38 exit (0);