Commit 63bb8fba by Georg-Johann Lay Committed by 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.

From-SVN: r277236
parent ba7f76dd
2019-10-20 Georg-Johann Lay <avr@gjlay.de>
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 <hubicka@ucw.cz> 2019-10-20 Jan Hubicka <hubicka@ucw.cz>
* gcc.c-torture/execute/alias-access-path-2.c: New testcase. * gcc.c-torture/execute/alias-access-path-2.c: New testcase.
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-require-effective-target size32plus } */
/* { dg-additional-options "-march=core-avx2" { target { x86_64-*-* i?86-*-* } } } */ /* { dg-additional-options "-march=core-avx2" { target { x86_64-*-* i?86-*-* } } } */
typedef enum { typedef enum {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
struct A struct A
{ {
int b; int b;
int c:24; __INT32_TYPE__ c:24;
int d:10; int d:10;
int e; int e;
} f; } f;
......
...@@ -2,25 +2,25 @@ ...@@ -2,25 +2,25 @@
struct foo struct foo
{ {
unsigned x; __UINT32_TYPE__ x;
}; };
typedef struct foo foo; typedef struct foo foo;
static inline int zot(foo *f) static inline __INT32_TYPE__ zot(foo *f)
{ {
int ret; int ret;
if (f->x > 0x7FFFFFFF) if (f->x > 0x7FFFFFFF)
ret = (int)(f->x - 0x7FFFFFFF); ret = (__INT32_TYPE__)(f->x - 0x7FFFFFFF);
else else
ret = (int)f->x - 0x7FFFFFFF; ret = (__INT32_TYPE__)f->x - 0x7FFFFFFF;
return ret; return ret;
} }
void __attribute__((noinline,noclone)) bar(foo *f) void __attribute__((noinline,noclone)) bar(foo *f)
{ {
int ret = zot(f); __INT32_TYPE__ ret = zot(f);
volatile int x = ret; volatile __INT32_TYPE__ x = ret;
if (ret < 1) if (ret < 1)
__builtin_abort (); __builtin_abort ();
} }
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-require-effective-target indirect_jumps } */ /* { dg-require-effective-target indirect_jumps } */
/* { dg-additional-options "-w" { target avr-*-* } } */
void f (void); void f (void);
void g (void); void g (void);
void h (int a) void h (int a)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-additional-options "-mcpu=power8" { target powerpc*-*-* } } */ /* { dg-additional-options "-mcpu=power8" { target powerpc*-*-* } } */
/* { dg-additional-options "-w" { target avr-*-* } } */
long f; long f;
void a(); void a();
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-require-effective-target size32plus } */
int a[100][70304]; int a[100][70304];
int b[100]; int b[100];
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-require-effective-target size32plus } */
int a; int a;
extern int f[10][91125]; extern int f[10][91125];
......
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-O3 -fno-strict-aliasing" } */ /* { dg-options "-O3 -fno-strict-aliasing" } */
struct s { int x; } __attribute__((packed)); struct s { __INT32_TYPE__ x; } __attribute__((packed));
struct t { int x; }; struct t { __INT32_TYPE__ x; };
void __attribute__((noinline,noipa)) void __attribute__((noinline,noipa))
swap(struct s* p, struct t* q) swap(struct s* p, struct t* q)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment