]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
AVR: Make gcc.dg/pr113596.c work.
authorGeorg-Johann Lay <avr@gjlay.de>
Wed, 2 Oct 2024 16:42:26 +0000 (18:42 +0200)
committerGeorg-Johann Lay <avr@gjlay.de>
Wed, 2 Oct 2024 16:42:26 +0000 (18:42 +0200)
gcc/testsuite/
* gcc.dg/pr113596.c: Require less memory so it works on AVR.

gcc/testsuite/gcc.dg/pr113596.c

index 19e0ab6dc4673072035c20109e494aaa028a4a79..3655ffef3f976445e6042c9904c1bbe7516727d2 100644 (file)
@@ -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);
 }