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>
This commit is contained in:
Martin Uecker 2024-11-12 18:08:17 +01:00 committed by Martin Uecker
parent a019429f36
commit a3098b9a72
3 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}