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