gcc.dg/pr113596.c alloca'tes  up to 8 KiB on stack,
which is too much for AVR.  This patch requests less
memory on AVR.

Johann

--

    AVR: Make gcc.dg/pr113596.c work.

    gcc/testsuite/
            * gcc.dg/pr113596.c: Require less memory so it works on AVR.

diff --git a/gcc/testsuite/gcc.dg/pr113596.c b/gcc/testsuite/gcc.dg/pr113596.c
index 19e0ab6dc46..3655ffef3f9 100644
--- a/gcc/testsuite/gcc.dg/pr113596.c
+++ b/gcc/testsuite/gcc.dg/pr113596.c
@@ -16,9 +16,17 @@ foo (int n)
   bar (p, n);
 }

+#if defined __AVR__
+/* For AVR devices, AVRtest assigns 8 KiB of stack, which is not quite
+   enough for this test case.  Thus request less memory on AVR.  */
+#define ALLOC 6000
+#else
+#define ALLOC 8192
+#endif
+
 int
 main ()
 {
-  for (int i = 2; i < 8192; ++i)
+  for (int i = 2; i < ALLOC; ++i)
     foo (i);
 }

Reply via email to