diff mbox series

[testsuite] More fixes for small targets.

Message ID 83bf9631-09db-24a7-b267-1da7a9a9edca@gjlay.de
State New
Headers show
Series [testsuite] More fixes for small targets. | expand

Commit Message

Georg-Johann Lay Oct. 18, 2019, 3:33 p.m. UTC
Here is some more cases fixed for small targets for noise reduction.

Ok to apply?

Johann

gcc/testsuite/
	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.

Comments

Jeff Law Oct. 20, 2019, 4:47 p.m. UTC | #1
On 10/18/19 9:33 AM, Georg-Johann Lay wrote:
> Here is some more cases fixed for small targets for noise reduction.
> 
> Ok to apply?
> 
> Johann
> 
> gcc/testsuite/
>     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.
OK
jeff
diff mbox series

Patch

Index: gcc.dg/torture/20181024-1.c
===================================================================
--- gcc.dg/torture/20181024-1.c	(revision 277097)
+++ gcc.dg/torture/20181024-1.c	(working copy)
@@ -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 {
Index: gcc.dg/torture/pr86034.c
===================================================================
--- gcc.dg/torture/pr86034.c	(revision 277097)
+++ gcc.dg/torture/pr86034.c	(working copy)
@@ -6,7 +6,7 @@ 
 struct A
 {
   int b;
-  int c:24;
+  __INT32_TYPE__ c:24;
   int d:10;
   int e;
 } f;
Index: gcc.dg/torture/pr86554-1.c
===================================================================
--- gcc.dg/torture/pr86554-1.c	(revision 277097)
+++ gcc.dg/torture/pr86554-1.c	(working copy)
@@ -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 ();
 }
Index: gcc.dg/torture/pr87693.c
===================================================================
--- gcc.dg/torture/pr87693.c	(revision 277097)
+++ gcc.dg/torture/pr87693.c	(working copy)
@@ -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)
Index: gcc.dg/torture/pr90972.c
===================================================================
--- gcc.dg/torture/pr90972.c	(revision 277097)
+++ gcc.dg/torture/pr90972.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-additional-options "-mcpu=power8" { target powerpc*-*-* } } */
+/* { dg-additional-options "-w" { target avr-*-* } } */
 
 long f;
 void a();
Index: gcc.dg/torture/pr91178-2.c
===================================================================
--- gcc.dg/torture/pr91178-2.c	(revision 277097)
+++ gcc.dg/torture/pr91178-2.c	(working copy)
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-require-effective-target size32plus } */
 
 int a[100][70304];
 int b[100];
Index: gcc.dg/torture/pr91178.c
===================================================================
--- gcc.dg/torture/pr91178.c	(revision 277097)
+++ gcc.dg/torture/pr91178.c	(working copy)
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-require-effective-target size32plus } */
 
 int a;
 extern int f[10][91125];
Index: gcc.dg/tree-ssa/pr91091-1.c
===================================================================
--- gcc.dg/tree-ssa/pr91091-1.c	(revision 277097)
+++ gcc.dg/tree-ssa/pr91091-1.c	(working copy)
@@ -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)