1 /* { dg-do run } */
2 /* { dg-options "-std=gnu89" } */
3 
4 /* In standard C, enumeration constants always have type int.  If they
5    are not representables are int, they're ill-formed.  In GNU C, we
6    give such ill-formed constructs well-defined meaning.  Make sure it
7    works.  */
8 
9 #include <stdlib.h>
10 
11 enum foo
12 {
13   foo1   = 0,
14   foo2   = 0xffffffffffffffffULL,
15   foo3   = 0xf0fffffffffffffeULL
16 };
17 
main()18 int main ()
19 {
20   if (sizeof (enum foo) != sizeof (unsigned long long))
21     abort ();
22   exit (0);
23 }
24