diff mbox

gcc testsuite patch committed: Add new test

Message ID mcrsjkkf6xe.fsf@dhcp-172-18-216-180.mtv.corp.google.com
State New
Headers show

Commit Message

Ian Lance Taylor Dec. 16, 2011, 11:11 p.m. UTC
I committed this patch as a test case I worked up for PR 51592.  It
turns out that Jakub already fixed the problem, but he was only working
from a Go test case.  This patch adds a C test case in the hopes of
making the problem less likely to recur.  Committed to mainline.

Ian


2011-12-16  Ian Lance Taylor  <iant@google.com>

	PR middle-end/51592
	* gcc.dg/20111216-1.c: New test.
diff mbox

Patch

Index: gcc.dg/20111216-1.c
===================================================================
--- gcc.dg/20111216-1.c	(revision 0)
+++ gcc.dg/20111216-1.c	(revision 0)
@@ -0,0 +1,17 @@ 
+/* { dg-do compile } */
+/* { dg-options "-O -fexceptions -fnon-call-exceptions" } */
+
+extern void f2 () __attribute__ ((noreturn));
+void
+f1 ()
+{
+  unsigned char a[8];
+  unsigned int i;
+
+  for (i = 0; i < 8; i++)
+    {
+      if (i > 8)
+	f2 ();
+      a[i] = i <= 8;
+    }
+}