From patchwork Sun Sep 2 08:57:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [testsuite] : Add testcase for PR49206 From: Uros Bizjak X-Patchwork-Id: 181172 Message-Id: To: gcc-patches@gcc.gnu.org Date: Sun, 2 Sep 2012 10:57:12 +0200 Hello! The testcase failed to compile with 4.6 with spill failure, but compiles OK with 4.7+. I have backed-out the change that made the bug latent, and the testcase still passed on mainline. This is maximum we can do with the testcase at this point, so attached patch adds the test to gcc testsuite, so the bug can be closed. 2012-09-02 Uros Bizjak PR target/49206 * gcc.c-torture/compile/pr49206.c: New test. Tested on x86_64-pc-linux-gnu {,-m32} and committed to mainline SVN. Uros. Index: gcc.c-torture/compile/pr49206.c =================================================================== --- gcc.c-torture/compile/pr49206.c (revision 0) +++ gcc.c-torture/compile/pr49206.c (working copy) @@ -0,0 +1,26 @@ +struct S1 +{ + short f0; +}; +extern volatile struct S1 g_5; +extern int g_120, i; +extern short g_339; + +int +func_72 (int x, int y, struct S1 z) +{ + for (z.f0 = -3; z.f0 > 16; z.f0 += 1) + foo (); + return g_120; +} + +int +main () +{ + while (g_339 % 0x200003) + continue; + if (i) + func_72 (0, 0, g_5); + foo (&g_339); + return 0; +}