This patch is in 4.1 but not in 4.3. Applied.

Jie
	* gcc.c-torture/execute/multi-ix.c: Disable the test if
	STACK_SIZE is too small.
	* gcc.c-torture/execute/20040313-1.c: Allow for small
	STACK_SIZE.
	* gcc.c-torture/execute/20040811-1.c: Likewise.

Index: gcc.c-torture/execute/multi-ix.c
===================================================================
--- gcc.c-torture/execute/multi-ix.c	(revision 3805)
+++ gcc.c-torture/execute/multi-ix.c	(working copy)
@@ -146,7 +146,8 @@
 int
 main ()
 {
-  f (1);
+  if (sizeof (l) >= 40 * sizeof(int))
+    f (1);
   exit (0);
 }
 
Index: gcc.c-torture/execute/20040811-1.c
===================================================================
--- gcc.c-torture/execute/20040811-1.c	(revision 3805)
+++ gcc.c-torture/execute/20040811-1.c	(working copy)
@@ -1,6 +1,16 @@
 /* Ensure that we deallocate X when branching back before its
    declaration.  */
 
+#ifdef STACK_SIZE
+#if STACK_SIZE < 5000
+#define NUM (STACK_SIZE / 5)
+#endif
+#endif
+
+#ifndef NUM
+#define NUM 1000
+#endif
+
 void *volatile p;
                                                                                 
 int
@@ -8,9 +18,9 @@
 {
   int n = 0;
  lab:;
-  int x[n % 1000 + 1];
+  int x[n % NUM + 1];
   x[0] = 1;
-  x[n % 1000] = 2;
+  x[n % NUM] = 2;
   p = x;
   n++;
   if (n < 1000000)
Index: gcc.c-torture/execute/20040313-1.c
===================================================================
--- gcc.c-torture/execute/20040313-1.c	(revision 3805)
+++ gcc.c-torture/execute/20040313-1.c	(working copy)
@@ -1,17 +1,27 @@
 /* PR middle-end/14470 */
 /* Origin: Lodewijk Voge <lv...@cs.vu.nl> */
 
+#ifdef STACK_SIZE
+#if STACK_SIZE < 5000
+#define NUM (STACK_SIZE / 5)
+#endif
+#endif
+
+#ifndef NUM
+#define NUM 1024
+#endif
+
 extern void abort(void);
 
 int main()
 {
-  int t[1025] = { 1024 }, d;
+  int t[NUM + 1] = { NUM }, d;
 
   d = 0;
   d = t[d]++;
-  if (t[0] != 1025)
+  if (t[0] != NUM + 1)
     abort();
-  if (d != 1024)
+  if (d != NUM)
     abort();
   return 0;
 }
_______________________________________________
Toolchain-devel mailing list
Toolchain-devel@blackfin.uclinux.org
https://blackfin.uclinux.org/mailman/listinfo/toolchain-devel

Reply via email to