* RFA: Fix some gcc tests for 16-bit targets
@ 2014-02-17 17:08 Nick Clifton
2014-02-17 20:02 ` DJ Delorie
2014-02-17 20:11 ` Richard Biener
0 siblings, 2 replies; 5+ messages in thread
From: Nick Clifton @ 2014-02-17 17:08 UTC (permalink / raw)
To: gcc-patches
Hi Guys,
There are several tests in the gcc testsuite which implicitly assume a
32-bit (or larger) target. The patch below provides fixes for these
tests in a variety of different ways. Where possible I have tried to
recode the test so that it will compile on a 16-bit target, but in a
couple of cases the test itself is too big, and so I have added a
requirement on a 32-bit+ target.
Tested with no regressions on an i686-pc-linux-gnu and an
x86_64-pc-linux-gnu toolchain, and with reduction in the number of
unexpected failures for rl78-elf, rx-elf and msp430-elf toolchains.
OK to apply ?
Cheers
Nick
gcc/testsuite/ChangeLog
2014-02-17 Nick Clifton <nickc@redhat.com>
* gcc.dg/c-torture/execute/pr43220.c: Use a long integer to
count the iterations.
* gcc.c-torture/execute/pr58570.c: Use a long integer to hold a
29-bit bitfield.
* gcc.c-torture/unsorted/DFcmp.c: Use smaller arrays on 16-bit
targets.
* gcc.c-torture/unsorted/SFset.c: Likewise.
* gcc.dg/graphite/pr46966.c: Require a 32-bit plus target - it
is too big for smaller targets.
* gcc.dg/pr23623.c: Use a long integer to hold 31-bit
bitfields.
* gcc.dg/pr48784-1.c: Use a long integer to hold a 28-bit
bitfield.
* gcc.dg/pr48784-2.c: Likewise.
* gcc.dg/pr56997-2.c: Use a long integer as the test_type on
16-bit targets.
* gcc.dg/pr59471.c: Use a long integer as the 32-bit vector type
on 16-bit targets.
* gcc.dg/sms-6.c: Use a long integer as the array_type on
16-bit targets.
* gcc.dg/torture/vec-cvt-1.c: Require a 32-bit plus target - it
is too big for smaller targets.
Index: gcc/testsuite/gcc.c-torture/execute/pr43220.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr43220.c (revision 207817)
+++ gcc/testsuite/gcc.c-torture/execute/pr43220.c (working copy)
@@ -3,7 +3,7 @@
int
main (void)
{
- int n = 0;
+ long int n = 0;
lab:;
{
int x[n % 1000 + 1];
Index: gcc/testsuite/gcc.c-torture/execute/pr58570.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr58570.c (revision 207817)
+++ gcc/testsuite/gcc.c-torture/execute/pr58570.c (working copy)
@@ -2,7 +2,7 @@
struct S
{
int f0:15;
- int f1:29;
+ long int f1:29;
};
int e = 1, i;
Index: gcc/testsuite/gcc.c-torture/unsorted/DFcmp.c
===================================================================
--- gcc/testsuite/gcc.c-torture/unsorted/DFcmp.c (revision 207817)
+++ gcc/testsuite/gcc.c-torture/unsorted/DFcmp.c (working copy)
@@ -22,6 +22,17 @@
#define adrx1 (E1[x1])
#define regx1 (p1[x1])
+#if __SIZEOF_INT__ <= 2
+#undef E0
+#define E0 ((type *)10000)
+#undef adrreg0
+#define adrreg0 (p0[10000])
+#undef E1
+#define E1 ((type *)(1111 & ~(__alignof__ (type) - 1)))
+#undef adrreg1
+#define adrreg1 (p1[1111/4])
+#endif
+
reg0reg1 (r0, r1, x0, x1, p0, p1)
type r0, r1; type *p0, *p1;
{if (reg0 <= reg1) return 1; else return 0;}
Index: gcc/testsuite/gcc.c-torture/unsorted/SFset.c
===================================================================
--- gcc/testsuite/gcc.c-torture/unsorted/SFset.c (revision 207817)
+++ gcc/testsuite/gcc.c-torture/unsorted/SFset.c (working copy)
@@ -18,6 +18,17 @@
#define adrx1 (E1[x1])
#define regx1 (p1[x1])
+#if __SIZEOF_INT__ <= 2
+#undef E0
+#define E0 ((type *)10000)
+#undef adrreg0
+#define adrreg0 (p0[10000])
+#undef E1
+#define E1 ((type *)(1111 & ~(__alignof__ (type) - 1)))
+#undef adrreg1
+#define adrreg1 (p1[1111/4])
+#endif
+
int glob0, glob1;
#define type float
Index: gcc/testsuite/gcc.dg/graphite/pr46966.c
===================================================================
--- gcc/testsuite/gcc.dg/graphite/pr46966.c (revision 207817)
+++ gcc/testsuite/gcc.dg/graphite/pr46966.c (working copy)
@@ -1,5 +1,7 @@
/* PR tree-optimization/46966 */
/* { dg-do compile } */
+/* This test is too big for small targets. */
+/* { dg-require-effective-target size32plus } */
/* { dg-options "-O -floop-interchange -ffast-math -fno-tree-copy-prop -fno-tree-loop-im" } */
int a[1000][1000];
Index: gcc/testsuite/gcc.dg/pr23623.c
===================================================================
--- gcc/testsuite/gcc.dg/pr23623.c (revision 207817)
+++ gcc/testsuite/gcc.dg/pr23623.c (working copy)
@@ -8,19 +8,19 @@
extern struct
{
unsigned int b : 1;
- unsigned int : 31;
+ unsigned long int : 31;
} bf1;
extern volatile struct
{
unsigned int b : 1;
- unsigned int : 31;
+ unsigned long int : 31;
} bf2;
extern struct
{
volatile unsigned int b : 1;
- volatile unsigned int : 31;
+ volatile unsigned long int : 31;
} bf3;
void writeb(void)
@@ -45,4 +45,3 @@
variable, we need to give a count of 12 instead of 6 here. */
/* { dg-final { scan-rtl-dump-times "mem/v(/.)*:SI" 12 "final" } } */
/* { dg-final { cleanup-rtl-dump "final" } } */
-
Index: gcc/testsuite/gcc.dg/pr48784-1.c
===================================================================
--- gcc/testsuite/gcc.dg/pr48784-1.c (revision 207817)
+++ gcc/testsuite/gcc.dg/pr48784-1.c (working copy)
@@ -6,13 +6,13 @@
#pragma pack(1)
volatile struct S0 {
signed a : 7;
- unsigned b : 28; /* b can't be fetched with an aligned 32-bit access, */
+ unsigned long b : 28; /* b can't be fetched with an aligned 32-bit access, */
/* but it certainly can be fetched with an unaligned access */
-} g = {0,0xfffffff};
+} g = {0,0xfffffffUL};
int main() {
- unsigned b = g.b;
- if (b != 0xfffffff)
+ unsigned long b = g.b;
+ if (b != 0xfffffffUL)
abort ();
return 0;
}
Index: gcc/testsuite/gcc.dg/pr48784-2.c
===================================================================
--- gcc/testsuite/gcc.dg/pr48784-2.c (revision 207817)
+++ gcc/testsuite/gcc.dg/pr48784-2.c (working copy)
@@ -6,13 +6,13 @@
#pragma pack(1)
volatile struct S0 {
signed a : 7;
- unsigned b : 28; /* b can't be fetched with an aligned 32-bit access, */
+ unsigned long b : 28; /* b can't be fetched with an aligned 32-bit access, */
/* but it certainly can be fetched with an unaligned access */
-} g = {0,0xfffffff};
+} g = {0,0xfffffffUL};
int main() {
- unsigned b = g.b;
- if (b != 0xfffffff)
+ unsigned long b = g.b;
+ if (b != 0xfffffffUL)
abort ();
return 0;
}
Index: gcc/testsuite/gcc.dg/pr56997-2.c
===================================================================
--- gcc/testsuite/gcc.dg/pr56997-2.c (revision 207817)
+++ gcc/testsuite/gcc.dg/pr56997-2.c (working copy)
@@ -4,8 +4,13 @@
extern void abort (void);
+#if __SIZEOF_INT__ <= 2
+#define test_type unsigned long
+#define MAGIC 0x1020304ul
+#else
#define test_type unsigned int
#define MAGIC 0x1020304u
+#endif
typedef struct s{
unsigned char Prefix;
Index: gcc/testsuite/gcc.dg/pr59471.c
===================================================================
--- gcc/testsuite/gcc.dg/pr59471.c (revision 207817)
+++ gcc/testsuite/gcc.dg/pr59471.c (working copy)
@@ -6,8 +6,13 @@
typedef unsigned short uint16x8_t
__attribute__ ((__vector_size__ (16)));
+#if __SIZEOF_INT__ <= 2
+typedef unsigned long int uint32x4_t
+__attribute__ ((__vector_size__ (16)));
+#else
typedef unsigned int uint32x4_t
__attribute__ ((__vector_size__ (16)));
+#endif
void
foo (uint16x8_t *x, uint8x4_t *y)
Index: gcc/testsuite/gcc.dg/sms-6.c
===================================================================
--- gcc/testsuite/gcc.dg/sms-6.c (revision 207817)
+++ gcc/testsuite/gcc.dg/sms-6.c (working copy)
@@ -2,10 +2,16 @@
/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms --param sms-min-sc=1" } */
/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms --param sms-min-sc=1 -fmodulo-sched-allow-regmoves" { target powerpc*-*-* } } */
+#if (__SIZEOF_INT__ <= 2)
+typedef long int array_type;
+#else
+typedef int array_type;
+#endif
+
extern void abort (void);
__attribute__ ((noinline))
-void foo (int * __restrict__ a, int * __restrict__ b, int * __restrict__ c)
+void foo (array_type * __restrict__ a, array_type * __restrict__ b, array_type * __restrict__ c)
{
int i;
for(i = 0; i < 100; i+=4)
@@ -17,16 +23,13 @@
}
}
+array_type a[100], b[100], c[100];
-int a[100], b[100], c[100];
int main()
{
-#if (__SIZEOF_INT__ <= 2)
int i;
- long res;
-#else
- int i, res;
-#endif
+ array_type res;
+
for(i = 0; i < 100; i++)
{
b[i] = c[i] = i;
@@ -47,4 +50,3 @@
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* } } } */
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 3 "sms" { target powerpc*-*-* } } } */
/* { dg-final { cleanup-rtl-dump "sms" } } */
-
Index: gcc/testsuite/gcc.dg/torture/vec-cvt-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/vec-cvt-1.c (revision 207817)
+++ gcc/testsuite/gcc.dg/torture/vec-cvt-1.c (working copy)
@@ -1,4 +1,6 @@
/* { dg-do run } */
+/* This test is too big for small targets. */
+/* { dg-require-effective-target size32plus } */
#include <stdlib.h>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RFA: Fix some gcc tests for 16-bit targets
2014-02-17 17:08 RFA: Fix some gcc tests for 16-bit targets Nick Clifton
@ 2014-02-17 20:02 ` DJ Delorie
2014-02-17 20:11 ` Richard Biener
1 sibling, 0 replies; 5+ messages in thread
From: DJ Delorie @ 2014-02-17 20:02 UTC (permalink / raw)
To: Nick Clifton; +Cc: gcc-patches
> struct S
> {
> int f0:15;
> - int f1:29;
> + long int f1:29;
> };
IIRC if you change one field here, you need to change both as some
targets won't pack fields together if the types don't match.
Likewise for other struct-field cases.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RFA: Fix some gcc tests for 16-bit targets
2014-02-17 17:08 RFA: Fix some gcc tests for 16-bit targets Nick Clifton
2014-02-17 20:02 ` DJ Delorie
@ 2014-02-17 20:11 ` Richard Biener
2014-02-18 16:43 ` nick clifton
1 sibling, 1 reply; 5+ messages in thread
From: Richard Biener @ 2014-02-17 20:11 UTC (permalink / raw)
To: Nick Clifton, gcc-patches
On February 17, 2014 6:03:56 PM GMT+01:00, Nick Clifton <nickc@redhat.com> wrote:
>Hi Guys,
>
> There are several tests in the gcc testsuite which implicitly assume a
> 32-bit (or larger) target. The patch below provides fixes for these
> tests in a variety of different ways. Where possible I have tried to
> recode the test so that it will compile on a 16-bit target, but in a
> couple of cases the test itself is too big, and so I have added a
> requirement on a 32-bit+ target.
>
> Tested with no regressions on an i686-pc-linux-gnu and an
> x86_64-pc-linux-gnu toolchain, and with reduction in the number of
> unexpected failures for rl78-elf, rx-elf and msp430-elf toolchains.
>
> OK to apply ?
Instead of modifying testcases I'd be less nervous if you'd make them require 32bit. Otherwise you should reproduce the original issues with the modified testcases.
Thanks,
Richard.
>Cheers
> Nick
>
>gcc/testsuite/ChangeLog
>2014-02-17 Nick Clifton <nickc@redhat.com>
>
> * gcc.dg/c-torture/execute/pr43220.c: Use a long integer to
> count the iterations.
> * gcc.c-torture/execute/pr58570.c: Use a long integer to hold a
> 29-bit bitfield.
> * gcc.c-torture/unsorted/DFcmp.c: Use smaller arrays on 16-bit
> targets.
> * gcc.c-torture/unsorted/SFset.c: Likewise.
> * gcc.dg/graphite/pr46966.c: Require a 32-bit plus target - it
> is too big for smaller targets.
> * gcc.dg/pr23623.c: Use a long integer to hold 31-bit
> bitfields.
> * gcc.dg/pr48784-1.c: Use a long integer to hold a 28-bit
> bitfield.
> * gcc.dg/pr48784-2.c: Likewise.
> * gcc.dg/pr56997-2.c: Use a long integer as the test_type on
> 16-bit targets.
> * gcc.dg/pr59471.c: Use a long integer as the 32-bit vector type
> on 16-bit targets.
> * gcc.dg/sms-6.c: Use a long integer as the array_type on
> 16-bit targets.
> * gcc.dg/torture/vec-cvt-1.c: Require a 32-bit plus target - it
> is too big for smaller targets.
>
>Index: gcc/testsuite/gcc.c-torture/execute/pr43220.c
>===================================================================
>--- gcc/testsuite/gcc.c-torture/execute/pr43220.c (revision 207817)
>+++ gcc/testsuite/gcc.c-torture/execute/pr43220.c (working copy)
>@@ -3,7 +3,7 @@
> int
> main (void)
> {
>- int n = 0;
>+ long int n = 0;
> lab:;
> {
> int x[n % 1000 + 1];
>Index: gcc/testsuite/gcc.c-torture/execute/pr58570.c
>===================================================================
>--- gcc/testsuite/gcc.c-torture/execute/pr58570.c (revision 207817)
>+++ gcc/testsuite/gcc.c-torture/execute/pr58570.c (working copy)
>@@ -2,7 +2,7 @@
> struct S
> {
> int f0:15;
>- int f1:29;
>+ long int f1:29;
> };
>
> int e = 1, i;
>Index: gcc/testsuite/gcc.c-torture/unsorted/DFcmp.c
>===================================================================
>--- gcc/testsuite/gcc.c-torture/unsorted/DFcmp.c (revision 207817)
>+++ gcc/testsuite/gcc.c-torture/unsorted/DFcmp.c (working copy)
>@@ -22,6 +22,17 @@
> #define adrx1 (E1[x1])
> #define regx1 (p1[x1])
>
>+#if __SIZEOF_INT__ <= 2
>+#undef E0
>+#define E0 ((type *)10000)
>+#undef adrreg0
>+#define adrreg0 (p0[10000])
>+#undef E1
>+#define E1 ((type *)(1111 & ~(__alignof__ (type) - 1)))
>+#undef adrreg1
>+#define adrreg1 (p1[1111/4])
>+#endif
>+
> reg0reg1 (r0, r1, x0, x1, p0, p1)
> type r0, r1; type *p0, *p1;
> {if (reg0 <= reg1) return 1; else return 0;}
>Index: gcc/testsuite/gcc.c-torture/unsorted/SFset.c
>===================================================================
>--- gcc/testsuite/gcc.c-torture/unsorted/SFset.c (revision 207817)
>+++ gcc/testsuite/gcc.c-torture/unsorted/SFset.c (working copy)
>@@ -18,6 +18,17 @@
> #define adrx1 (E1[x1])
> #define regx1 (p1[x1])
>
>+#if __SIZEOF_INT__ <= 2
>+#undef E0
>+#define E0 ((type *)10000)
>+#undef adrreg0
>+#define adrreg0 (p0[10000])
>+#undef E1
>+#define E1 ((type *)(1111 & ~(__alignof__ (type) - 1)))
>+#undef adrreg1
>+#define adrreg1 (p1[1111/4])
>+#endif
>+
> int glob0, glob1;
>
> #define type float
>Index: gcc/testsuite/gcc.dg/graphite/pr46966.c
>===================================================================
>--- gcc/testsuite/gcc.dg/graphite/pr46966.c (revision 207817)
>+++ gcc/testsuite/gcc.dg/graphite/pr46966.c (working copy)
>@@ -1,5 +1,7 @@
> /* PR tree-optimization/46966 */
> /* { dg-do compile } */
>+/* This test is too big for small targets. */
>+/* { dg-require-effective-target size32plus } */
>/* { dg-options "-O -floop-interchange -ffast-math -fno-tree-copy-prop
>-fno-tree-loop-im" } */
>
> int a[1000][1000];
>Index: gcc/testsuite/gcc.dg/pr23623.c
>===================================================================
>--- gcc/testsuite/gcc.dg/pr23623.c (revision 207817)
>+++ gcc/testsuite/gcc.dg/pr23623.c (working copy)
>@@ -8,19 +8,19 @@
> extern struct
> {
> unsigned int b : 1;
>- unsigned int : 31;
>+ unsigned long int : 31;
> } bf1;
>
> extern volatile struct
> {
> unsigned int b : 1;
>- unsigned int : 31;
>+ unsigned long int : 31;
> } bf2;
>
> extern struct
> {
> volatile unsigned int b : 1;
>- volatile unsigned int : 31;
>+ volatile unsigned long int : 31;
> } bf3;
>
> void writeb(void)
>@@ -45,4 +45,3 @@
> variable, we need to give a count of 12 instead of 6 here. */
> /* { dg-final { scan-rtl-dump-times "mem/v(/.)*:SI" 12 "final" } } */
> /* { dg-final { cleanup-rtl-dump "final" } } */
>-
>Index: gcc/testsuite/gcc.dg/pr48784-1.c
>===================================================================
>--- gcc/testsuite/gcc.dg/pr48784-1.c (revision 207817)
>+++ gcc/testsuite/gcc.dg/pr48784-1.c (working copy)
>@@ -6,13 +6,13 @@
> #pragma pack(1)
> volatile struct S0 {
> signed a : 7;
>- unsigned b : 28; /* b can't be fetched with an aligned 32-bit
>access, */
>+ unsigned long b : 28; /* b can't be fetched with an aligned 32-bit
>access, */
> /* but it certainly can be fetched with an unaligned access */
>-} g = {0,0xfffffff};
>+} g = {0,0xfffffffUL};
>
> int main() {
>- unsigned b = g.b;
>- if (b != 0xfffffff)
>+ unsigned long b = g.b;
>+ if (b != 0xfffffffUL)
> abort ();
> return 0;
> }
>Index: gcc/testsuite/gcc.dg/pr48784-2.c
>===================================================================
>--- gcc/testsuite/gcc.dg/pr48784-2.c (revision 207817)
>+++ gcc/testsuite/gcc.dg/pr48784-2.c (working copy)
>@@ -6,13 +6,13 @@
> #pragma pack(1)
> volatile struct S0 {
> signed a : 7;
>- unsigned b : 28; /* b can't be fetched with an aligned 32-bit
>access, */
>+ unsigned long b : 28; /* b can't be fetched with an aligned 32-bit
>access, */
> /* but it certainly can be fetched with an unaligned access */
>-} g = {0,0xfffffff};
>+} g = {0,0xfffffffUL};
>
> int main() {
>- unsigned b = g.b;
>- if (b != 0xfffffff)
>+ unsigned long b = g.b;
>+ if (b != 0xfffffffUL)
> abort ();
> return 0;
> }
>Index: gcc/testsuite/gcc.dg/pr56997-2.c
>===================================================================
>--- gcc/testsuite/gcc.dg/pr56997-2.c (revision 207817)
>+++ gcc/testsuite/gcc.dg/pr56997-2.c (working copy)
>@@ -4,8 +4,13 @@
>
> extern void abort (void);
>
>+#if __SIZEOF_INT__ <= 2
>+#define test_type unsigned long
>+#define MAGIC 0x1020304ul
>+#else
> #define test_type unsigned int
> #define MAGIC 0x1020304u
>+#endif
>
> typedef struct s{
> unsigned char Prefix;
>Index: gcc/testsuite/gcc.dg/pr59471.c
>===================================================================
>--- gcc/testsuite/gcc.dg/pr59471.c (revision 207817)
>+++ gcc/testsuite/gcc.dg/pr59471.c (working copy)
>@@ -6,8 +6,13 @@
> typedef unsigned short uint16x8_t
> __attribute__ ((__vector_size__ (16)));
>
>+#if __SIZEOF_INT__ <= 2
>+typedef unsigned long int uint32x4_t
>+__attribute__ ((__vector_size__ (16)));
>+#else
> typedef unsigned int uint32x4_t
> __attribute__ ((__vector_size__ (16)));
>+#endif
>
> void
> foo (uint16x8_t *x, uint8x4_t *y)
>Index: gcc/testsuite/gcc.dg/sms-6.c
>===================================================================
>--- gcc/testsuite/gcc.dg/sms-6.c (revision 207817)
>+++ gcc/testsuite/gcc.dg/sms-6.c (working copy)
>@@ -2,10 +2,16 @@
>/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms --param
>sms-min-sc=1" } */
>/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms --param sms-min-sc=1
>-fmodulo-sched-allow-regmoves" { target powerpc*-*-* } } */
>
>+#if (__SIZEOF_INT__ <= 2)
>+typedef long int array_type;
>+#else
>+typedef int array_type;
>+#endif
>+
> extern void abort (void);
>
> __attribute__ ((noinline))
>-void foo (int * __restrict__ a, int * __restrict__ b, int *
>__restrict__ c)
>+void foo (array_type * __restrict__ a, array_type * __restrict__ b,
>array_type * __restrict__ c)
> {
> int i;
> for(i = 0; i < 100; i+=4)
>@@ -17,16 +23,13 @@
> }
> }
>
>+array_type a[100], b[100], c[100];
>
>-int a[100], b[100], c[100];
> int main()
> {
>-#if (__SIZEOF_INT__ <= 2)
> int i;
>- long res;
>-#else
>- int i, res;
>-#endif
>+ array_type res;
>+
> for(i = 0; i < 100; i++)
> {
> b[i] = c[i] = i;
>@@ -47,4 +50,3 @@
>/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target
>spu-*-* } } } */
>/* { dg-final { scan-rtl-dump-times "SMS succeeded" 3 "sms" { target
>powerpc*-*-* } } } */
> /* { dg-final { cleanup-rtl-dump "sms" } } */
>-
>Index: gcc/testsuite/gcc.dg/torture/vec-cvt-1.c
>===================================================================
>--- gcc/testsuite/gcc.dg/torture/vec-cvt-1.c (revision 207817)
>+++ gcc/testsuite/gcc.dg/torture/vec-cvt-1.c (working copy)
>@@ -1,4 +1,6 @@
> /* { dg-do run } */
>+/* This test is too big for small targets. */
>+/* { dg-require-effective-target size32plus } */
>
> #include <stdlib.h>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RFA: Fix some gcc tests for 16-bit targets
2014-02-17 20:11 ` Richard Biener
@ 2014-02-18 16:43 ` nick clifton
2014-02-19 12:24 ` Richard Biener
0 siblings, 1 reply; 5+ messages in thread
From: nick clifton @ 2014-02-18 16:43 UTC (permalink / raw)
To: Richard Biener, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 916 bytes --]
Hi Richard,
> Instead of modifying testcases I'd be less nervous if you'd make them require 32bit. Otherwise you should reproduce the original issues with the modified testcases.
OK, I can do that. How about this patch.
OK to apply ?
Cheers
Nick
gcc/testsuite/ChangeLog
2014-02-18 Nick Clifton <nickc@redhat.com>
* gcc.dg/graphite/pr46966.c: Only run on 32-bit+ targets.
* gcc.dg/pr23623.c: Likewise.
* gcc.dg/pr48784-1.c: Likewise.
* gcc.dg/pr48784-2.c: Likewise.
* gcc.dg/pr56997-2.c: Likewise.
* gcc.dg/sms-6.c: Likewise.
* gcc.dg/torture/pr60183.c: Likewise.
* gcc.dg/torture/vec-cvt-1.c: Likewise.
* gcc.c-torture/execute/20061220-1.x: New.
* gcc.c-torture/execute/pr43220.x: New.
* gcc.c-torture/execute/pr51581-1.x: New.
* gcc.c-torture/execute/pr51581-2.x: New.
* gcc.c-torture/execute/pr58570.x: New.
* gcc.c-torture/unsorted/DFcmp.x: New.
* gcc.c-torture/unsorted/SFset.x: New.
[-- Attachment #2: 16-bit.tests.patch --]
[-- Type: text/x-patch, Size: 5492 bytes --]
Index: gcc/testsuite/gcc.dg/graphite/pr46966.c
===================================================================
--- gcc/testsuite/gcc.dg/graphite/pr46966.c (revision 207836)
+++ gcc/testsuite/gcc.dg/graphite/pr46966.c (working copy)
@@ -1,5 +1,7 @@
/* PR tree-optimization/46966 */
/* { dg-do compile } */
+/* This test is too big for small targets. */
+/* { dg-require-effective-target size32plus } */
/* { dg-options "-O -floop-interchange -ffast-math -fno-tree-copy-prop -fno-tree-loop-im" } */
int a[1000][1000];
Index: gcc/testsuite/gcc.dg/pr23623.c
===================================================================
--- gcc/testsuite/gcc.dg/pr23623.c (revision 207836)
+++ gcc/testsuite/gcc.dg/pr23623.c (working copy)
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-require-effective-target size32plus } */
/* { dg-options "-fstrict-volatile-bitfields -fdump-rtl-final" } */
/* With -fstrict-volatile-bitfields, the volatile accesses to bf2.b
Index: gcc/testsuite/gcc.dg/pr48784-1.c
===================================================================
--- gcc/testsuite/gcc.dg/pr48784-1.c (revision 207836)
+++ gcc/testsuite/gcc.dg/pr48784-1.c (working copy)
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-require-effective-target size32plus } */
/* { dg-options "-fstrict-volatile-bitfields" } */
extern void abort (void);
Index: gcc/testsuite/gcc.dg/pr48784-2.c
===================================================================
--- gcc/testsuite/gcc.dg/pr48784-2.c (revision 207836)
+++ gcc/testsuite/gcc.dg/pr48784-2.c (working copy)
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-require-effective-target size32plus } */
/* { dg-options "-fno-strict-volatile-bitfields" } */
extern void abort (void);
Index: gcc/testsuite/gcc.dg/pr56997-2.c
===================================================================
--- gcc/testsuite/gcc.dg/pr56997-2.c (revision 207836)
+++ gcc/testsuite/gcc.dg/pr56997-2.c (working copy)
@@ -1,5 +1,6 @@
/* Test volatile access to unaligned field. */
/* { dg-do run } */
+/* { dg-require-effective-target size32plus } */
/* { dg-options "-fstrict-volatile-bitfields" } */
extern void abort (void);
Index: gcc/testsuite/gcc.dg/sms-6.c
===================================================================
--- gcc/testsuite/gcc.dg/sms-6.c (revision 207836)
+++ gcc/testsuite/gcc.dg/sms-6.c (working copy)
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-require-effective-target size32plus } */
/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms --param sms-min-sc=1" } */
/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms --param sms-min-sc=1 -fmodulo-sched-allow-regmoves" { target powerpc*-*-* } } */
Index: gcc/testsuite/gcc.dg/torture/pr60183.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr60183.c (revision 207836)
+++ gcc/testsuite/gcc.dg/torture/pr60183.c (working copy)
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-require-effective-target size32plus } */
/* Large so an out-of-bound read will crash. */
unsigned char c[0x30001] = { 1 };
Index: gcc/testsuite/gcc.dg/torture/vec-cvt-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/vec-cvt-1.c (revision 207836)
+++ gcc/testsuite/gcc.dg/torture/vec-cvt-1.c (working copy)
@@ -1,4 +1,6 @@
/* { dg-do run } */
+/* This test is too big for small targets. */
+/* { dg-require-effective-target size32plus } */
#include <stdlib.h>
*** /dev/null 2014-02-18 08:00:55.971916261 +0000
--- gcc/testsuite/gcc.c-torture/execute/20061220-1.x 2014-02-12 17:20:52.601890142 +0000
***************
*** 0 ****
--- 1,6 ----
+ # asm statements for the RL78 do not work as expected
+ if { [istarget "rl78-*-*"] } {
+ return 1;
+ }
+
+ return 0
*** /dev/null 2014-02-18 08:00:55.971916261 +0000
--- gcc/testsuite/gcc.c-torture/execute/pr43220.x 2014-02-18 13:07:38.953426402 +0000
***************
*** 0 ****
--- 1,7 ----
+ load_lib target-supports.exp
+
+ if { [check_effective_target_int16] } {
+ return 1
+ }
+
+ return 0;
*** /dev/null 2014-02-18 08:00:55.971916261 +0000
--- gcc/testsuite/gcc.c-torture/execute/pr51581-1.x 2014-02-12 17:27:28.208877630 +0000
***************
*** 0 ****
--- 1,7 ----
+ load_lib target-supports.exp
+
+ if { [check_effective_target_int32plus] } {
+ return 0
+ }
+
+ return 1;
*** /dev/null 2014-02-18 08:00:55.971916261 +0000
--- gcc/testsuite/gcc.c-torture/execute/pr51581-2.x 2014-02-12 17:28:01.607876574 +0000
***************
*** 0 ****
--- 1,7 ----
+ load_lib target-supports.exp
+
+ if { [check_effective_target_int32plus] } {
+ return 0
+ }
+
+ return 1;
*** /dev/null 2014-02-18 08:00:55.971916261 +0000
--- gcc/testsuite/gcc.c-torture/execute/pr58570.x 2014-02-18 13:08:06.783427174 +0000
***************
*** 0 ****
--- 1,7 ----
+ load_lib target-supports.exp
+
+ if { [check_effective_target_int16] } {
+ return 1
+ }
+
+ return 0;
*** /dev/null 2014-02-18 08:00:55.971916261 +0000
--- gcc/testsuite/gcc.c-torture/unsorted/DFcmp.x 2014-02-18 13:08:23.102427626 +0000
***************
*** 0 ****
--- 1,7 ----
+ load_lib target-supports.exp
+
+ if { [check_effective_target_int16] } {
+ return 1
+ }
+
+ return 0;
*** /dev/null 2014-02-18 08:00:55.971916261 +0000
--- gcc/testsuite/gcc.c-torture/unsorted/SFset.x 2014-02-18 13:08:57.315428575 +0000
***************
*** 0 ****
--- 1,7 ----
+ load_lib target-supports.exp
+
+ if { [check_effective_target_int16] } {
+ return 1
+ }
+
+ return 0;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RFA: Fix some gcc tests for 16-bit targets
2014-02-18 16:43 ` nick clifton
@ 2014-02-19 12:24 ` Richard Biener
0 siblings, 0 replies; 5+ messages in thread
From: Richard Biener @ 2014-02-19 12:24 UTC (permalink / raw)
To: nick clifton; +Cc: GCC Patches
On Tue, Feb 18, 2014 at 5:39 PM, nick clifton <nickc@redhat.com> wrote:
> Hi Richard,
>
>
>> Instead of modifying testcases I'd be less nervous if you'd make them
>> require 32bit. Otherwise you should reproduce the original issues with the
>> modified testcases.
>
>
> OK, I can do that. How about this patch.
>
>
> OK to apply ?
Ok.
Thanks,
Richard.
> Cheers
> Nick
>
> gcc/testsuite/ChangeLog
> 2014-02-18 Nick Clifton <nickc@redhat.com>
>
> * gcc.dg/graphite/pr46966.c: Only run on 32-bit+ targets.
> * gcc.dg/pr23623.c: Likewise.
> * gcc.dg/pr48784-1.c: Likewise.
> * gcc.dg/pr48784-2.c: Likewise.
> * gcc.dg/pr56997-2.c: Likewise.
> * gcc.dg/sms-6.c: Likewise.
> * gcc.dg/torture/pr60183.c: Likewise.
> * gcc.dg/torture/vec-cvt-1.c: Likewise.
> * gcc.c-torture/execute/20061220-1.x: New.
> * gcc.c-torture/execute/pr43220.x: New.
> * gcc.c-torture/execute/pr51581-1.x: New.
> * gcc.c-torture/execute/pr51581-2.x: New.
> * gcc.c-torture/execute/pr58570.x: New.
> * gcc.c-torture/unsorted/DFcmp.x: New.
> * gcc.c-torture/unsorted/SFset.x: New.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-19 12:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-17 17:08 RFA: Fix some gcc tests for 16-bit targets Nick Clifton
2014-02-17 20:02 ` DJ Delorie
2014-02-17 20:11 ` Richard Biener
2014-02-18 16:43 ` nick clifton
2014-02-19 12:24 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).