From: Georg-Johann Lay Date: Thu, 22 Dec 2016 12:42:35 +0000 (+0000) Subject: re PR testsuite/52641 (Test cases fail for 16-bit int targets) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7fbb9b18cc759b014a90c48f4bcd98709ea0b84b;p=gcc.git re PR testsuite/52641 (Test cases fail for 16-bit int targets) gcc/testsuite/ PR testsuite/52641 * gcc.dg/pr35258.c (main) : Use an integer value that has at least a size of 4. * gcc.dg/Walloca-1.c (foo1): Use alloca with 30000 (instead of 90000). * gcc.dg/graphite/pr46185.c: Require int32plus, size32plus. * gcc.dg/graphite/isl-ast-op-select.c: Same. * gcc.dg/graphite/pr42205-1.c: Require int32plus. * gcc.dg/graphite/pr42221.c: Same. * gcc.dg/tree-ssa/pr65136.c: Same. * gcc.dg/tree-ssa/sra-20.c: Same. * gcc.dg/graphite/scop-0.c: Require size32plus. * gcc.dg/graphite/scop-22.c: Same. * gcc.dg/graphite/scop-3.c: Same. * gcc.dg/graphite/scop-dsyr2k.c: Same. * gcc.dg/graphite/scop-dsyrk.c: Same. * gcc.dg/graphite/scop-mvt.c: Same. * gcc.dg/graphite/scop-sor.c: Same. * gcc.dg/tree-ssa/pr68529-3.c: Same. * gcc.dg/tree-ssa/pr66449.c [long != pointer]: Use intptr_t if. * gcc.dg/tree-ssa/pr70919.c [int <= 2]: Use 32-bit int as needed. * gcc.dg/tree-ssa/pr71408.c: Same. * gcc.dg/tree-ssa/ssa-dom-thread-8.c (f2) [long != pointer]: Use uintptr_t instead of long for int representation of address. * gcc.dg/tree-ssa/tailcall-7-run.c: Require trampolines. From-SVN: r243885 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 33908d5e803..c63fd5e6e38 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,30 @@ +2016-12-22 Georg-Johann Lay + + PR testsuite/52641 + * gcc.dg/pr35258.c (main) : Use an integer value that has + at least a size of 4. + * gcc.dg/Walloca-1.c (foo1): Use alloca with 30000 (instead of 90000). + * gcc.dg/graphite/pr46185.c: Require int32plus, size32plus. + * gcc.dg/graphite/isl-ast-op-select.c: Same. + * gcc.dg/graphite/pr42205-1.c: Require int32plus. + * gcc.dg/graphite/pr42221.c: Same. + * gcc.dg/tree-ssa/pr65136.c: Same. + * gcc.dg/tree-ssa/sra-20.c: Same. + * gcc.dg/graphite/scop-0.c: Require size32plus. + * gcc.dg/graphite/scop-22.c: Same. + * gcc.dg/graphite/scop-3.c: Same. + * gcc.dg/graphite/scop-dsyr2k.c: Same. + * gcc.dg/graphite/scop-dsyrk.c: Same. + * gcc.dg/graphite/scop-mvt.c: Same. + * gcc.dg/graphite/scop-sor.c: Same. + * gcc.dg/tree-ssa/pr68529-3.c: Same. + * gcc.dg/tree-ssa/pr66449.c [long != pointer]: Use intptr_t if. + * gcc.dg/tree-ssa/pr70919.c [int <= 2]: Use 32-bit int as needed. + * gcc.dg/tree-ssa/pr71408.c: Same. + * gcc.dg/tree-ssa/ssa-dom-thread-8.c (f2) [long != pointer]: Use + uintptr_t instead of long for int representation of address. + * gcc.dg/tree-ssa/tailcall-7-run.c: Require trampolines. + 2016-12-22 Jakub Jelinek PR middle-end/78858 diff --git a/gcc/testsuite/gcc.dg/Walloca-1.c b/gcc/testsuite/gcc.dg/Walloca-1.c index 32e4ab8c962..1a516f0a59d 100644 --- a/gcc/testsuite/gcc.dg/Walloca-1.c +++ b/gcc/testsuite/gcc.dg/Walloca-1.c @@ -27,7 +27,7 @@ void foo1 (size_t len, size_t len2, size_t len3) // { dg-warning "unbounded use of 'alloca'" "" { target { ! lp64 } } 26 } useit (s); - s = alloca(90000); /* { dg-warning "is too large" } */ + s = alloca (30000); /* { dg-warning "is too large" } */ useit (s); if (len < 2000) diff --git a/gcc/testsuite/gcc.dg/graphite/isl-ast-op-select.c b/gcc/testsuite/gcc.dg/graphite/isl-ast-op-select.c index 688176e0ed5..a0c302b3ea5 100644 --- a/gcc/testsuite/gcc.dg/graphite/isl-ast-op-select.c +++ b/gcc/testsuite/gcc.dg/graphite/isl-ast-op-select.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target size32plus } */ +/* { dg-require-effective-target int32plus } */ /* { dg-options "-O2 -floop-nest-optimize" } */ static void kernel_gemm(int ni, int nj, int nk, double alpha, double beta, double C[1024][1024], double A[1024][1024], double B[1024][1024]) diff --git a/gcc/testsuite/gcc.dg/graphite/pr42205-1.c b/gcc/testsuite/gcc.dg/graphite/pr42205-1.c index 413b9f7eab8..9cca6dec44a 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr42205-1.c +++ b/gcc/testsuite/gcc.dg/graphite/pr42205-1.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target int32plus } */ /* { dg-options "-O1 -ffast-math -floop-interchange" } */ int adler32(int adler, char *buf, int n) diff --git a/gcc/testsuite/gcc.dg/graphite/pr42221.c b/gcc/testsuite/gcc.dg/graphite/pr42221.c index da8daa1e2a1..ed3cd44c71e 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr42221.c +++ b/gcc/testsuite/gcc.dg/graphite/pr42221.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target int32plus } */ /* { dg-options "-Os -fgraphite-identity" } */ static void b2w(unsigned int *out, const unsigned char *in, unsigned int len) diff --git a/gcc/testsuite/gcc.dg/graphite/pr46185.c b/gcc/testsuite/gcc.dg/graphite/pr46185.c index 36d46a41cb9..7f9ae074719 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr46185.c +++ b/gcc/testsuite/gcc.dg/graphite/pr46185.c @@ -1,4 +1,6 @@ /* { dg-do run } */ +/* { dg-require-effective-target size32plus } */ +/* { dg-require-effective-target int32plus } */ /* { dg-options "-O2 -floop-interchange -ffast-math -fno-ipa-cp" } */ #define DEBUG 0 diff --git a/gcc/testsuite/gcc.dg/graphite/scop-0.c b/gcc/testsuite/gcc.dg/graphite/scop-0.c index abeabce98a8..738c3f6b889 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-0.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-0.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target size32plus } */ int foo (void); void bar (void); diff --git a/gcc/testsuite/gcc.dg/graphite/scop-22.c b/gcc/testsuite/gcc.dg/graphite/scop-22.c index 6ff5ccd5b56..f9c16c99425 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-22.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-22.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target size32plus } */ double u[1782225]; void foo(int N, int *res) diff --git a/gcc/testsuite/gcc.dg/graphite/scop-3.c b/gcc/testsuite/gcc.dg/graphite/scop-3.c index 96e663930d2..279097647fa 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-3.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-3.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target size32plus } */ int toto() { int i, j, k; diff --git a/gcc/testsuite/gcc.dg/graphite/scop-dsyr2k.c b/gcc/testsuite/gcc.dg/graphite/scop-dsyr2k.c index d09c13059bd..f16f4a817d2 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-dsyr2k.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-dsyr2k.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target size32plus } */ #define NMAX 3000 static double a[NMAX][NMAX], b[NMAX][NMAX], c[NMAX][NMAX]; diff --git a/gcc/testsuite/gcc.dg/graphite/scop-dsyrk.c b/gcc/testsuite/gcc.dg/graphite/scop-dsyrk.c index 2f8919d3ebb..c176a7c2196 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-dsyrk.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-dsyrk.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target size32plus } */ #define NMAX 3000 #define MEASURE_TIME 1 diff --git a/gcc/testsuite/gcc.dg/graphite/scop-mvt.c b/gcc/testsuite/gcc.dg/graphite/scop-mvt.c index 442a3a0bafa..5819fe77cf9 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-mvt.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-mvt.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target size32plus } */ #define NMAX 2000 static double x1[NMAX], x2[NMAX], a[NMAX][NMAX], y_1[NMAX], y_2[NMAX]; diff --git a/gcc/testsuite/gcc.dg/graphite/scop-sor.c b/gcc/testsuite/gcc.dg/graphite/scop-sor.c index ad5278ac95c..adcdc437c71 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-sor.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-sor.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target size32plus } */ #define SIZE 10000 static double P[SIZE][SIZE]; diff --git a/gcc/testsuite/gcc.dg/pr35258.c b/gcc/testsuite/gcc.dg/pr35258.c index d1c45a79dc7..ef1260d00c4 100644 --- a/gcc/testsuite/gcc.dg/pr35258.c +++ b/gcc/testsuite/gcc.dg/pr35258.c @@ -10,7 +10,11 @@ char str[9] = "1234"; void bar (void) { +#if __SIZEOF_INT__ >= 4 unsigned int temp; +#else + __UINT32_TYPE__ temp; +#endif char *p = &str[2]; memcpy (&temp, &str[1], 4); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr65136.c b/gcc/testsuite/gcc.dg/tree-ssa/pr65136.c index b07dbb75f54..eeb02f57770 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr65136.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr65136.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target int32plus } } */ /* { dg-options "-O2 -fdump-rtl-expand-details" } */ int foo(unsigned int cc ) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr66449.c b/gcc/testsuite/gcc.dg/tree-ssa/pr66449.c index 986b3fb6b9a..cce26eb74e3 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr66449.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr66449.c @@ -1,6 +1,10 @@ /* { dg-do compile } */ /* { dg-options "-O3" } */ +#if __SIZEOF_POINTER__ != __SIZEOF_LONG__ +#define long __INTPTR_TYPE__ +#endif + void *fn1(void *p1, void *p2, long p3) { long a = (long)p1, b = (long)p2, c = p3; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr68529-3.c b/gcc/testsuite/gcc.dg/tree-ssa/pr68529-3.c index 583b4a610a5..be7e609bcb5 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr68529-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr68529-3.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target size32plus } } */ /* { dg-options "-O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */ void bar(char *s); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr70919.c b/gcc/testsuite/gcc.dg/tree-ssa/pr70919.c index bed0ab37a20..2422242ea5c 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr70919.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr70919.c @@ -4,7 +4,11 @@ #pragma pack(1) struct S0 { +#if __SIZEOF_INT >= 4 int f0:24; +#else + __INT32_TYPE__ f0:24; +#endif }; struct S1 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr71408.c b/gcc/testsuite/gcc.dg/tree-ssa/pr71408.c index 896a42869e5..d81b813f83d 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr71408.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr71408.c @@ -1,6 +1,8 @@ /* PR middle-end/71408 */ /* { dg-do run } */ /* { dg-options "-Os" } */ + +#if __SIZEOF_INT__ >= 4 unsigned a, b; struct S0 @@ -8,6 +10,15 @@ struct S0 int f1:18; unsigned f3:4; }; +#else +__UINT32_TYPE__ a, b; + +struct S0 +{ + __INT32_TYPE__ f1:18; + unsigned f3:4; +}; +#endif void fn1 () { diff --git a/gcc/testsuite/gcc.dg/tree-ssa/sra-20.c b/gcc/testsuite/gcc.dg/tree-ssa/sra-20.c index 5002c247575..e732640f1dc 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/sra-20.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/sra-20.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target int32plus } } */ /* { dg-options "-O1 -Wall" } */ /* PR/70013, SRA of constant-pool loads removes initialization of part of d. */ #pragma pack (1) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c index 9be75aaf21d..c456d734fa7 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c @@ -300,7 +300,11 @@ f2 (struct C *x) else { o = f2 (x); +#if __SIZEOF_POINTER__ == __SIZEOF_LONG__ if (((unsigned long) o > (unsigned long) -4000L)) +#elif __SIZEOF_POINTER__ == __SIZEOF_INT__ + if (((__UINTPTR_TYPE__) o > (__UINTPTR_TYPE__) -4000U)) +#endif { e = 5; goto out; @@ -384,7 +388,11 @@ f2 (struct C *x) break; case 19: o = f2 (x); +#if __SIZEOF_POINTER__ == __SIZEOF_LONG__ if (((unsigned long) o > (unsigned long) -4000L)) +#elif __SIZEOF_POINTER__ == __SIZEOF_INT__ + if (((__UINTPTR_TYPE__) o > (__UINTPTR_TYPE__) -4000U)) +#endif { e = 6; goto out; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/tailcall-7-run.c b/gcc/testsuite/gcc.dg/tree-ssa/tailcall-7-run.c index d18ff9d8914..b67ebf12661 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/tailcall-7-run.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/tailcall-7-run.c @@ -1,4 +1,4 @@ -/* { dg-do run } */ +/* { dg-do run { target trampolines } } */ /* { dg-options "-O2" } */ /* { dg-additional-sources "tailcall-7.c" } */