This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH,TESTSUITE]Reduce malloc size used by ipa-sra-2.c
- From: Andrew Hutchinson <andrewhutchinson at cox dot net>
- To: gcc-patches at gcc dot gnu dot org, janis187 at us dot ibm dot com
- Date: Sat, 31 Oct 2009 14:36:28 -0400
- Subject: [PATCH,TESTSUITE]Reduce malloc size used by ipa-sra-2.c
Janis
This patch corrects a testcase where malloc size 1,000,000 is way too
big for target.
Size requested is reduce if stack size is below 16000.
The patch removes failures for AVR target.
Ok to commit?
2009-10-31 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
*gcc.c-torture/execute/ ipa-sra-2.c: Reduce allocation if stack is small.
Index: ipa-sra-2.c
===================================================================
--- ipa-sra-2.c (revision 153529)
+++ ipa-sra-2.c (working copy)
@@ -1,3 +1,8 @@
+#if defined(STACK_SIZE) && STACK_SIZE < 16000
+#define ARRAY_SIZE (STACK_SIZE)
+#else
+#define ARRAY_SIZE 1000000
+#endif
struct big
{
int data[1000000];