diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20020910-1.c | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/930217-1.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/930513-1.c | 6 |
3 files changed, 18 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20020910-1.c b/gcc/testsuite/gcc.c-torture/compile/20020910-1.c index 31398ea3d45..092809b769c 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20020910-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20020910-1.c @@ -1,3 +1,8 @@ +/* The bit-field below would have a problem if __INT_MAX__ is too + small. */ +#if __INT_MAX__ < 2147483647 +int a; +#else unsigned int x0 = 0; typedef struct { @@ -11,4 +16,4 @@ static void foo (void) { yy.field1 = (unsigned int ) (&x0); } - +#endif diff --git a/gcc/testsuite/gcc.c-torture/compile/930217-1.c b/gcc/testsuite/gcc.c-torture/compile/930217-1.c index 70f4a4897c4..0f64a040712 100644 --- a/gcc/testsuite/gcc.c-torture/compile/930217-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/930217-1.c @@ -1,3 +1,8 @@ +/* The bit-field below would have a problem if __INT_MAX__ is too + small. */ +#if __INT_MAX__ < 2147483647 +int a; +#else double g (); typedef union { struct { @@ -12,3 +17,4 @@ f(x, n) ((s *)&x)->u.e -= n; x = g((double)x, -n); } +#endif diff --git a/gcc/testsuite/gcc.c-torture/compile/930513-1.c b/gcc/testsuite/gcc.c-torture/compile/930513-1.c index 2e106ae43a9..463fd89b401 100644 --- a/gcc/testsuite/gcc.c-torture/compile/930513-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/930513-1.c @@ -1,3 +1,8 @@ +/* The bit-field below would have a problem if __INT_MAX__ is too + small. */ +#if __INT_MAX__ < 2147483647 +int a; +#else struct s { int f1 : 26; int f2 : 8; @@ -7,3 +12,4 @@ f (struct s *x) { return x->f2++ == 0; } +#endif |