Test pr20621 requires a target with more than 64K of available stack.
This patch adds a path to pass the test when the target has declared 
a STACK_SIZE of 64K or less

2014-12-30  James Bowman  <james.bow...@ftdichip.com>

  * gcc/testsuite/gcc.c-torture/execute/pr20621-1.c:
  pass if stack < 64K

Index: gcc/testsuite/gcc.c-torture/execute/pr20621-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr20621-1.c     (revision 215531)
+++ gcc/testsuite/gcc.c-torture/execute/pr20621-1.c     (working copy)
@@ -1,6 +1,10 @@
 /* When generating o32 MIPS PIC, main's $gp save slot was out of range
    of a single load instruction.  */
+#if defined(STACK_SIZE) && STACK_SIZE <= 0x10000
+int main (void) { return 0; }
+#else
 struct big { int i[sizeof (int) >= 4 && sizeof (void *) >= 4 ? 0x4000 : 4]; };
 struct big gb;
 int foo (struct big b, int x) { return b.i[x]; }
 int main (void) { return foo (gb, 0) + foo (gb, 1); }
+#endif

--
James Bowman
FTDI Open Source Liaison

Reply via email to