This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Adjust tests for smaller targets


Janis.

here are patches to several tests that adjust their sizes for smaller data sizes and disable some for AVR target.
Tested on AVR target where is removed corresponding failures.


Ok for 4.4 mainline?

best regards



2008-05-26 Andy Hutchinson <hutchinsonandy@aim.com>

* gcc.dg/tree-ssa/data-dep-1.c : Skip test for avr-*-* as there is too much code.
* gcc.dg/tree-ssa/ldist-3.c : Ditto.
* gcc.dg/tree-ssa/ldist-5.c : Ditto
* gcc.dg/tree-ssa/ifc-20040816-2 .c : Adjust test for int size < 4 bytes.
* gcc.dg/tree-ssa/pr32540-1.c : Ditto.
* gcc.dg/tree-ssa/pr32540-2.c : Ditto.
* gcc.dg/tree-ssa/ssa-lim-5.c : Ditto.
* gcc.dg/tree-ssa/pr23115.c : Adjust test for double size < 8 bytes.





Index: gcc/testsuite/gcc.dg/tree-ssa/data-dep-1.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/data-dep-1.c  (revision 135884)
+++ gcc/testsuite/gcc.dg/tree-ssa/data-dep-1.c  (working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */ 
 /* { dg-options "-O2 -ftree-loop-linear -fdump-tree-ltrans-all" } */
+/* { dg-skip-if "too much code for avr" { "avr-*-*" } { "*" } { "" } } */
 
 int foo (int n, int m)
 {
Index: gcc/testsuite/gcc.dg/tree-ssa/ifc-20040816-2.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/ifc-20040816-2.c  (revision 135884)
+++ gcc/testsuite/gcc.dg/tree-ssa/ifc-20040816-2.c  (working copy)
@@ -11,7 +11,11 @@
 {
   unsigned int pi;
   int tmp_r, tmp_i, tmp_k;
+#if __SIZEOF_INT__ >= 4
   for (pi = 0; pi < (512)*(512); pi++) {
+#else
+  for (pi = 0; pi < (32)*(32); pi++) {
+#endif
     int zr = zr_in[pi];
     int zi = zi_in[pi];
     int zk = zk_in[pi];
Index: gcc/testsuite/gcc.dg/tree-ssa/ldist-3.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/ldist-3.c (revision 135884)
+++ gcc/testsuite/gcc.dg/tree-ssa/ldist-3.c (working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */ 
 /* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-all" } */
+/* { dg-skip-if "too much code for avr" { "avr-*-*" } { "*" } { "" } } */
 
 int loop1 (int k)
 {
Index: gcc/testsuite/gcc.dg/tree-ssa/ldist-5.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/ldist-5.c (revision 135884)
+++ gcc/testsuite/gcc.dg/tree-ssa/ldist-5.c (working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */ 
 /* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-all" } */
+/* { dg-skip-if "too much code for avr" { "avr-*-*" } { "*" } { "" } } */
 
 int loop1 (int k)
 {
Index: gcc/testsuite/gcc.dg/tree-ssa/pr23115.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/pr23115.c (revision 135884)
+++ gcc/testsuite/gcc.dg/tree-ssa/pr23115.c (working copy)
@@ -12,9 +12,13 @@
 {
   long j;
   double R, n, x;
-
+#if __SIZEOF_DOUBLE__ >= 8
   n = 1.e300;
   x = -1.e300;
+#else
+  n = 1.e30;
+  x = -1.e30;
+#endif
   for( j=0; j < 2; j++ )
     {
       x = MAX2(x,p[j]);
Index: gcc/testsuite/gcc.dg/tree-ssa/pr32540-1.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/pr32540-1.c   (revision 135884)
+++ gcc/testsuite/gcc.dg/tree-ssa/pr32540-1.c   (working copy)
@@ -19,6 +19,7 @@
    if (f()) options |= 0x1 << 13;
    if (f()) options |= 0x1 << 14;
    if (f()) options |= 0x1 << 15;
+#if(__SIZEOF_INT__ >= 4)    
    if (f()) options |= 0x1 << 16;
    if (f()) options |= 0x1 << 17;
    if (f()) options |= 0x1 << 18;
@@ -30,5 +31,6 @@
    if (f()) options |= 0x1 << 24;
    if (f()) options |= 0x1 << 25;
    if (f()) options |= 0x1 << 26;
+#endif
    if (f()) *t = options;
 }
Index: gcc/testsuite/gcc.dg/tree-ssa/pr32540-2.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/pr32540-2.c   (revision 135884)
+++ gcc/testsuite/gcc.dg/tree-ssa/pr32540-2.c   (working copy)
@@ -19,6 +19,7 @@
     if (f()) options |= 0x1 << 13;
     if (f()) options |= 0x1 << 14;
     if (f()) options |= 0x1 << 15;
+#if(__SIZEOF_INT__ >= 4)    
     if (f()) options |= 0x1 << 16;
     if (f()) options |= 0x1 << 17;
     if (f()) options |= 0x1 << 18;
@@ -30,6 +31,7 @@
     if (f()) options |= 0x1 << 24;
     if (f()) options |= 0x1 << 25;
     if (f()) options |= 0x1 << 26;
+#endif
     if (f()) *t = options;
 }
 
Index: gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-5.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-5.c   (revision 135884)
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-5.c   (working copy)
@@ -13,10 +13,14 @@
 
 int foo(struct BUF1 * p)
 {
-
     int i = 0;
+#if(__SIZEOF_INT__ >= 4)    
     for (i = 0; i < 1024*1024; i++)
+#else
+    for (i = 0; i <  128*128; i++)
+#endif
       p->b1 = 1;
+
     if (p->b1 != 1)
       link_error ();
     return 0;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]