re PR testsuite/52641 (Test cases fail for 16-bit int targets)
authorGeorg-Johann Lay <avr@gjlay.de>
Thu, 22 Dec 2016 12:42:35 +0000 (12:42 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Thu, 22 Dec 2016 12:42:35 +0000 (12:42 +0000)
gcc/testsuite/
PR testsuite/52641
* gcc.dg/pr35258.c (main) <temp>: 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

22 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Walloca-1.c
gcc/testsuite/gcc.dg/graphite/isl-ast-op-select.c
gcc/testsuite/gcc.dg/graphite/pr42205-1.c
gcc/testsuite/gcc.dg/graphite/pr42221.c
gcc/testsuite/gcc.dg/graphite/pr46185.c
gcc/testsuite/gcc.dg/graphite/scop-0.c
gcc/testsuite/gcc.dg/graphite/scop-22.c
gcc/testsuite/gcc.dg/graphite/scop-3.c
gcc/testsuite/gcc.dg/graphite/scop-dsyr2k.c
gcc/testsuite/gcc.dg/graphite/scop-dsyrk.c
gcc/testsuite/gcc.dg/graphite/scop-mvt.c
gcc/testsuite/gcc.dg/graphite/scop-sor.c
gcc/testsuite/gcc.dg/pr35258.c
gcc/testsuite/gcc.dg/tree-ssa/pr65136.c
gcc/testsuite/gcc.dg/tree-ssa/pr66449.c
gcc/testsuite/gcc.dg/tree-ssa/pr68529-3.c
gcc/testsuite/gcc.dg/tree-ssa/pr70919.c
gcc/testsuite/gcc.dg/tree-ssa/pr71408.c
gcc/testsuite/gcc.dg/tree-ssa/sra-20.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c
gcc/testsuite/gcc.dg/tree-ssa/tailcall-7-run.c

index 33908d5e803468ad1c53b4a48f7cb36e1f167e08..c63fd5e6e383d4fa23a18c3c21434ec9dd565227 100644 (file)
@@ -1,3 +1,30 @@
+2016-12-22  Georg-Johann Lay  <avr@gjlay.de>
+
+       PR testsuite/52641
+       * gcc.dg/pr35258.c (main) <temp>: 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  <jakub@redhat.com>
 
        PR middle-end/78858
index 32e4ab8c962f1217b44b1097a164855a0511226b..1a516f0a59d127e117b62a49f090d428fc1ebc14 100644 (file)
@@ -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)
index 688176e0ed584263415d615cb7f1702e880f8728..a0c302b3ea51368e28022bf6b4259100df06ba95 100644 (file)
@@ -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])
index 413b9f7eab8b81677fb28740e4a8d368c9889032..9cca6dec44a973cad7a5c36b00d7729f9f86d111 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
 /* { dg-options "-O1 -ffast-math -floop-interchange" } */
 
 int adler32(int adler, char *buf, int n)
index da8daa1e2a112c51c53e1fa9a8329a94ca0094bb..ed3cd44c71e3bc4a607cb5e59bafefb2dd6d821f 100644 (file)
@@ -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)
index 36d46a41cb98c5c6c53e15598c7512197c4edbaf..7f9ae0747196c2ebb3da1db650150cfc723f95f5 100644 (file)
@@ -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
index abeabce98a8f07a650a8a8b4569c3423de1d8242..738c3f6b88934e4a74717ebd3e0d8d1a57100da0 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target size32plus } */
 int foo (void);
 void bar (void);
 
index 6ff5ccd5b56956c651be2b3aafe5ee69582282d5..f9c16c99425faf75415f5b56da47c4ad2950cf19 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target size32plus } */
 double u[1782225];
 
 void foo(int N, int *res)
index 96e663930d2c3fb208b902a1d94f738edb207f25..279097647fadf6af03977074522db9e922281480 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target size32plus } */
 int toto()
 {
   int i, j, k;
index d09c13059bd06d7805773a7638c76f885ecc695b..f16f4a817d28f4f36cc789464bfa887bf551ee34 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target size32plus } */
 #define NMAX 3000
 
 static double a[NMAX][NMAX], b[NMAX][NMAX], c[NMAX][NMAX];
index 2f8919d3ebb35d33a56e93359bb7ba47f838c5df..c176a7c21969ca0be8361609080913d6c4f74df6 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target size32plus } */
 #define NMAX 3000
 #define MEASURE_TIME 1
 
index 442a3a0bafa07189d40fd6a216bc5c8f1118d206..5819fe77cf9535afd2cb35119a78f0ed865c2158 100644 (file)
@@ -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];
index ad5278ac95c64545da1b8ecc6b7eece08de06635..adcdc437c7137037148d86123c160195f3ffd0e9 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target size32plus } */
 #define SIZE 10000
 
 static double P[SIZE][SIZE];
index d1c45a79dc7405488559fc15cb9394753ec70aba..ef1260d00c4e50644b6efaf2b0c9ab1d17764032 100644 (file)
@@ -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);
index b07dbb75f54005094508dfb7a916e0932004a06d..eeb02f5777005d9197f102024b595bb84c91f5d1 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target int32plus } } */
 /* { dg-options "-O2 -fdump-rtl-expand-details" } */
 
 int foo(unsigned int cc )
index 986b3fb6b9a41e1ea6172a60a0f2ac7f16252792..cce26eb74e3f5ec6d2cebd5f221dacf68994db39 100644 (file)
@@ -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;
index 583b4a610a57b0c04e7adbb92baabdb0fb270d5b..be7e609bcb584db3b1423b245cf47ea51afe725c 100644 (file)
@@ -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);
index bed0ab37a2047a6964a40b80d513026d56f1b3ad..2422242ea5c009c933e25f895050bb879321efc4 100644 (file)
@@ -4,7 +4,11 @@
 #pragma pack(1)
 struct S0
 {
+#if __SIZEOF_INT >= 4
   int f0:24;
+#else
+  __INT32_TYPE__ f0:24;
+#endif
 };
 
 struct S1
index 896a42869e50cee4365f81cc191a734e75b7f3fe..d81b813f83d05adc2a5e4fbf42ada14f6e4d41ad 100644 (file)
@@ -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 ()
 {
index 5002c2475750c34311c4ec143d77aee62069cb5c..e732640f1dcc187b3e8692ee26b0eeb78cd3f355 100644 (file)
@@ -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)
index 9be75aaf21deeb68d37b56827abd47960a725b63..c456d734fa7589d5d075267db6c2161ae30caccd 100644 (file)
@@ -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;
index d18ff9d8914f1bf617bf3b9eda81d26122076502..b67ebf126611140128f09c3ce2beeb77c0579b7e 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-do run } */
+/* { dg-do run { target trampolines } } */
 /* { dg-options "-O2" } */
 /* { dg-additional-sources "tailcall-7.c" } */