(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.c-torture/
execute/
20050119-2.c
       1  /* PR middle-end/19874 */
       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  E
      15  foo (struct S *s)
      16  {
      17    if (s->a != s->b)
      18      abort ();
      19    if (s->c != C)
      20      abort ();
      21    return s->d;
      22  }
      23  
      24  int
      25  main (void)
      26  {
      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);
      39  }
      40