This should fix the test failures introduced by the fix for PR115157.
Tested on x86_64 and also tested with -m32. Fix test errors introduced with fix for PR115157. Fix tests introduced when fixing PR115157 that assume sizeof(enum)==sizeof(int) by adding the flag -fno-short-enums. gcc/testsuite/Changelog: * gcc.dg/enum-alias-1.c: Add flag. * gcc.dg/enum-alias-2.c: Add flag. * gcc.dg/enum-alias-3.c: Add flag. * gcc.dg/enum-alias-4.c: Add flag. diff --git a/gcc/testsuite/gcc.dg/enum-alias-1.c b/gcc/testsuite/gcc.dg/enum-alias-1.c index 8fa30eb7897..725d88580b8 100644 --- a/gcc/testsuite/gcc.dg/enum-alias-1.c +++ b/gcc/testsuite/gcc.dg/enum-alias-1.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O2" } */ +/* { dg-options "-O2 -fno-short-enums" } */ enum E { E1 = -1, E2 = 0, E3 = 1 }; diff --git a/gcc/testsuite/gcc.dg/enum-alias-2.c b/gcc/testsuite/gcc.dg/enum-alias-2.c index 7ca3f3b2db8..d988c5ee698 100644 --- a/gcc/testsuite/gcc.dg/enum-alias-2.c +++ b/gcc/testsuite/gcc.dg/enum-alias-2.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O2" } */ +/* { dg-options "-O2 -fno-short-enums" } */ typedef int A; diff --git a/gcc/testsuite/gcc.dg/enum-alias-3.c b/gcc/testsuite/gcc.dg/enum-alias-3.c index 36a4f02a455..4dbf0c9293a 100644 --- a/gcc/testsuite/gcc.dg/enum-alias-3.c +++ b/gcc/testsuite/gcc.dg/enum-alias-3.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O2 -flto" } */ +/* { dg-options "-O2 -flto -fno-short-enums" } */ typedef int *A; diff --git a/gcc/testsuite/gcc.dg/enum-alias-4.c b/gcc/testsuite/gcc.dg/enum-alias-4.c index b78d0451e3e..a1a8613fca0 100644 --- a/gcc/testsuite/gcc.dg/enum-alias-4.c +++ b/gcc/testsuite/gcc.dg/enum-alias-4.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O2" } */ +/* { dg-options "-O2 -fno-short-enums" } */ typedef int A; typedef int __attribute__ (( hardbool(0, 1) )) B;