From: Georg-Johann Lay Date: Mon, 21 Oct 2019 06:54:42 +0000 (+0000) Subject: Fix some fallout for small targets. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=63bb8fba4b60296c9200fe3e2aa47c536f99c905;p=gcc.git Fix some fallout for small targets. PR testsuite/52641 * gcc.dg/torture/pr86034.c: Use 32-bit base type for a bitfield of width > 16 bits. * gcc.dg/torture/pr90972.c [avr]: Add option "-w". * gcc.dg/torture/pr87693.c: Same. * gcc.dg/torture/pr91178.c: Add dg-require-effective-target size32plus. * gcc.dg/torture/pr91178-2.c: Same. * gcc.dg/torture/20181024-1.c * gcc.dg/torture/pr86554-1.c: Use 32-bit integers. * gcc.dg/tree-ssa/pr91091-1.c: Same. From-SVN: r277236 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 681cee69de4..9199be887cf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2019-10-20 Georg-Johann Lay + + Fix some fallout for small targets. + + PR testsuite/52641 + * gcc.dg/torture/pr86034.c: Use 32-bit base type for a bitfield of + width > 16 bits. + * gcc.dg/torture/pr90972.c [avr]: Add option "-w". + * gcc.dg/torture/pr87693.c: Same. + * gcc.dg/torture/pr91178.c: Add dg-require-effective-target size32plus. + * gcc.dg/torture/pr91178-2.c: Same. + * gcc.dg/torture/20181024-1.c + * gcc.dg/torture/pr86554-1.c: Use 32-bit integers. + * gcc.dg/tree-ssa/pr91091-1.c: Same. + 2019-10-20 Jan Hubicka * gcc.c-torture/execute/alias-access-path-2.c: New testcase. diff --git a/gcc/testsuite/gcc.dg/torture/20181024-1.c b/gcc/testsuite/gcc.dg/torture/20181024-1.c index f2cfe7f6d67..a3cce24b873 100644 --- a/gcc/testsuite/gcc.dg/torture/20181024-1.c +++ b/gcc/testsuite/gcc.dg/torture/20181024-1.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target size32plus } */ /* { dg-additional-options "-march=core-avx2" { target { x86_64-*-* i?86-*-* } } } */ typedef enum { diff --git a/gcc/testsuite/gcc.dg/torture/pr86034.c b/gcc/testsuite/gcc.dg/torture/pr86034.c index 247428c2772..d83ea394ce9 100644 --- a/gcc/testsuite/gcc.dg/torture/pr86034.c +++ b/gcc/testsuite/gcc.dg/torture/pr86034.c @@ -6,7 +6,7 @@ struct A { int b; - int c:24; + __INT32_TYPE__ c:24; int d:10; int e; } f; diff --git a/gcc/testsuite/gcc.dg/torture/pr86554-1.c b/gcc/testsuite/gcc.dg/torture/pr86554-1.c index 64f851e896e..562a187a5c4 100644 --- a/gcc/testsuite/gcc.dg/torture/pr86554-1.c +++ b/gcc/testsuite/gcc.dg/torture/pr86554-1.c @@ -2,25 +2,25 @@ struct foo { - unsigned x; + __UINT32_TYPE__ x; }; typedef struct foo foo; -static inline int zot(foo *f) +static inline __INT32_TYPE__ zot(foo *f) { int ret; if (f->x > 0x7FFFFFFF) - ret = (int)(f->x - 0x7FFFFFFF); + ret = (__INT32_TYPE__)(f->x - 0x7FFFFFFF); else - ret = (int)f->x - 0x7FFFFFFF; + ret = (__INT32_TYPE__)f->x - 0x7FFFFFFF; return ret; } void __attribute__((noinline,noclone)) bar(foo *f) { - int ret = zot(f); - volatile int x = ret; + __INT32_TYPE__ ret = zot(f); + volatile __INT32_TYPE__ x = ret; if (ret < 1) __builtin_abort (); } diff --git a/gcc/testsuite/gcc.dg/torture/pr87693.c b/gcc/testsuite/gcc.dg/torture/pr87693.c index b4ff59421c1..eb6d163d0f0 100644 --- a/gcc/testsuite/gcc.dg/torture/pr87693.c +++ b/gcc/testsuite/gcc.dg/torture/pr87693.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target indirect_jumps } */ - +/* { dg-additional-options "-w" { target avr-*-* } } */ + void f (void); void g (void); void h (int a) diff --git a/gcc/testsuite/gcc.dg/torture/pr90972.c b/gcc/testsuite/gcc.dg/torture/pr90972.c index 24f99b0ebb7..b18ccbd540e 100644 --- a/gcc/testsuite/gcc.dg/torture/pr90972.c +++ b/gcc/testsuite/gcc.dg/torture/pr90972.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-additional-options "-mcpu=power8" { target powerpc*-*-* } } */ +/* { dg-additional-options "-w" { target avr-*-* } } */ long f; void a(); diff --git a/gcc/testsuite/gcc.dg/torture/pr91178-2.c b/gcc/testsuite/gcc.dg/torture/pr91178-2.c index 0ebb4700b2a..ac5ae0e4fe5 100644 --- a/gcc/testsuite/gcc.dg/torture/pr91178-2.c +++ b/gcc/testsuite/gcc.dg/torture/pr91178-2.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target size32plus } */ int a[100][70304]; int b[100]; diff --git a/gcc/testsuite/gcc.dg/torture/pr91178.c b/gcc/testsuite/gcc.dg/torture/pr91178.c index b7a2dbe9e7f..fc72d6812c1 100644 --- a/gcc/testsuite/gcc.dg/torture/pr91178.c +++ b/gcc/testsuite/gcc.dg/torture/pr91178.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target size32plus } */ int a; extern int f[10][91125]; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr91091-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr91091-1.c index 2ee75d9804a..5a6ac1b3864 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr91091-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr91091-1.c @@ -1,8 +1,8 @@ /* { dg-do run } */ /* { dg-options "-O3 -fno-strict-aliasing" } */ -struct s { int x; } __attribute__((packed)); -struct t { int x; }; +struct s { __INT32_TYPE__ x; } __attribute__((packed)); +struct t { __INT32_TYPE__ x; }; void __attribute__((noinline,noipa)) swap(struct s* p, struct t* q)