1 /* PR c/19342 */ 2 typedef enum { A, B, C, D } E; 3 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 }; 10 11 extern void abort (void); 12 extern void exit (int); 13 14 void foo(struct S * s)15foo (struct S *s) 16 { 17 if (s->a != s->b) 18 abort (); 19 if (s->c != C) 20 abort (); 21 } 22 23 int main(void)24main (void) 25 { 26 struct S s[2]; 27 s[0].a = B; 28 s[0].b = B; 29 s[0].c = C; 30 s[0].d = D; 31 s[1].a = D; 32 s[1].b = C; 33 s[1].c = B; 34 s[1].d = A; 35 foo (s); 36 exit (0); 37 } 38