diff options
author | Martin Uecker <uecker@tugraz.at> | 2024-11-12 18:08:17 +0100 |
---|---|---|
committer | Martin Uecker <uecker@gcc.gnu.org> | 2024-11-18 20:53:15 +0100 |
commit | a3098b9a7281adef2028c2be3674094697557c2c (patch) | |
tree | 6d78feec419c6180dd9df771a9275bf624b5633d | |
parent | a019429f365e32d0ce01b0b60924f0dd37737769 (diff) | |
download | gcc-a3098b9a7281adef2028c2be3674094697557c2c.zip gcc-a3098b9a7281adef2028c2be3674094697557c2c.tar.gz gcc-a3098b9a7281adef2028c2be3674094697557c2c.tar.bz2 |
Fix test failures for enum-alias-{1,2,3} on arm-eabi [PR117419]
The tests added for PR115157 fail on arm-eabi. Add __INT_MAX__
to enum to make sure they have size int.
PR testsuite/117419
gcc/testsuite/ChangeLog:
* gcc.dg/enum-alias-1.c: Add __INT_MAX__.
* gcc.dg/enum-alias-2.c: Likewise.
* gcc.dg/enum-alias-3.c: Likewise.
Tested-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
-rw-r--r-- | gcc/testsuite/gcc.dg/enum-alias-1.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/enum-alias-2.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/enum-alias-3.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.dg/enum-alias-1.c b/gcc/testsuite/gcc.dg/enum-alias-1.c index 8fa30eb..a91eb66 100644 --- a/gcc/testsuite/gcc.dg/enum-alias-1.c +++ b/gcc/testsuite/gcc.dg/enum-alias-1.c @@ -1,7 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ -enum E { E1 = -1, E2 = 0, E3 = 1 }; +enum E { E1 = -1, E2 = 0, E3 = 1, MAX = __INT_MAX__ }; typedef int A; typedef enum E B; diff --git a/gcc/testsuite/gcc.dg/enum-alias-2.c b/gcc/testsuite/gcc.dg/enum-alias-2.c index 7ca3f3b..f107968 100644 --- a/gcc/testsuite/gcc.dg/enum-alias-2.c +++ b/gcc/testsuite/gcc.dg/enum-alias-2.c @@ -9,7 +9,7 @@ void* foo(void* a, void *b, void *c, void *d) { typedef enum E B; - enum E { E1 = -1, E2 = 0, E3 = 1 }; + enum E { E1 = -1, E2 = 0, E3 = 1, MAX = __INT_MAX__ }; *(B**)b = d; } diff --git a/gcc/testsuite/gcc.dg/enum-alias-3.c b/gcc/testsuite/gcc.dg/enum-alias-3.c index 322c8d8..fd226a4 100644 --- a/gcc/testsuite/gcc.dg/enum-alias-3.c +++ b/gcc/testsuite/gcc.dg/enum-alias-3.c @@ -9,7 +9,7 @@ void* foo(void* a, void *b, void *c, void *d) *(A**)a = c; typedef enum E *B; - enum E { E1 = -1, E2 = 0, E3 = 1 }; + enum E { E1 = -1, E2 = 0, E3 = 1, MAX = __INT_MAX__ }; { *(B**)b = d; } |