On Sat, Jun 06, 2020 at 10:21:31PM +0200, Jan Hubicka wrote: > diff --git a/gcc/testsuite/g++.dg/torture/pr95548.C > b/gcc/testsuite/g++.dg/torture/pr95548.C > new file mode 100644 > index 00000000000..bca4f753f7e > --- /dev/null > +++ b/gcc/testsuite/g++.dg/torture/pr95548.C > @@ -0,0 +1,8 @@ > +/* { dg-do compile } */ > +enum a { b = (unsigned long)-1 } c; > +#ifdef __SIZEOF_INT128__ > +enum c { d = (unsigned long)-1 } e; > +#endif > +main() > +{ > +}
The test fails everywhere, e.g. because main doesn't have return type. Here is what I have committed as obvious for it, tested on x86_64-linux -m32/-m64, and tested with your ipa change reverted to see the ICE in those cases. 2020-06-08 Jakub Jelinek <ja...@redhat.com> PR lto/95548 * g++.dg/torture/pr95548.C: Change from dg-do compile to dg-do link, add return type for main, for __SIZEOF_INT128__ test with __uint128_t enumerator constants and add a test with unsigned long long enumerators for all targets. --- gcc/testsuite/g++.dg/torture/pr95548.C.jj 2020-06-08 10:21:38.779224052 +0200 +++ gcc/testsuite/g++.dg/torture/pr95548.C 2020-06-08 10:24:48.229422404 +0200 @@ -1,8 +1,10 @@ -/* { dg-do compile } */ -enum a { b = (unsigned long)-1 } c; +/* { dg-do link } */ +enum A { A1 = (unsigned long)-1 } a; +enum B { B1 = (unsigned long long)-1, B2 = 0x123456789abcdef0ULL } b; #ifdef __SIZEOF_INT128__ -enum c { d = (unsigned long)-1 } e; +enum C { C1 = (__uint128_t)-1, C2 = ((__uint128_t) 0x123456789abcdef0ULL) << 64 | 0x0fedcba987654321ULL } c; #endif -main() +int +main () { } Jakub