On 07/27/2011 01:54 PM, Tom de Vries wrote:
> On 07/27/2011 01:50 PM, Tom de Vries wrote:
>> Hi Richard,
>>
>> I have a patch set for bug 43513 - The stack pointer is adjusted twice.
>>
>> 01_pr43513.3.patch
>> 02_pr43513.3.test.patch
>> 03_pr43513.3.mudflap.patch
>>
>> The patch set has been bootstrapped and reg-tested on x86_64.
>>
>> I will sent out the patches individually.
>>
Sorry, with patch this time.
>
> This patch adds the testcase from the bug report, modified not to
> need includes.
>
> OK for trunk?
>
> Thanks,
> - Tom
>
> 2011-07-27 Tom de Vries <[email protected]>
>
> PR middle-end/43513
> * gcc.dg/pr43513.c: New test.
Index: gcc/testsuite/gcc.dg/pr43513.c
===================================================================
--- gcc/testsuite/gcc.dg/pr43513.c (revision 0)
+++ gcc/testsuite/gcc.dg/pr43513.c (revision 0)
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-ccp1" } */
+
+void bar (int *);
+void foo (char *, int);
+
+void
+foo3 ()
+{
+ const int kIterations = 10;
+ int results[kIterations];
+ int i;
+ bar (results);
+ for (i = 0; i < kIterations; i++)
+ foo ("%d ", results[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "alloca" 0 "ccp1"} } */
+/* { dg-final { cleanup-tree-dump "ccp1" } } */