1 /* { dg-do compile { target i?86-*-* sparc*-*-* } } */
2 /* { dg-options "-O2" } */
3 
4 typedef enum { false, true } __attribute__ ((packed)) boolean;
5 typedef struct {
6   enum {
7     A0 = 0, A1 = 1, A2 = 2
8   } __attribute__((packed)) A:3;
9   enum {
10     B0 = 0, B1 = 1, B2 = 2
11   } __attribute__((packed)) B:3;
12   boolean C:1;
13   boolean D:1;
14   unsigned char :8;
15 } foo;
16 foo x = { A2, B1, false, true };
17 
main(void)18 int main(void)
19 {
20   if (sizeof (foo) != 2 || __alignof__ (foo) != 1)
21     abort ();
22 
23   exit (0);
24 }
25