Testcase for PR45732

Submitted by Richard Guenther on Oct. 7, 2010, 2:58 p.m.

Details

Message ID alpine.LNX.2.00.1010071658190.8982@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Guenther Oct. 7, 2010, 2:58 p.m.
Committed.

Richard.

2010-10-07  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/45732
	* gcc.dg/torture/pr45732.c: New testcase.

Patch hide | download patch | download mbox

Index: gcc/testsuite/gcc.dg/torture/pr45732.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr45732.c	(revision 0)
+++ gcc/testsuite/gcc.dg/torture/pr45732.c	(revision 0)
@@ -0,0 +1,10 @@ 
+/* { dg-do compile } */
+
+typedef char chars[5];
+const chars bad_chars[] = { "" };
+
+int foo ()
+{
+  const chars *c = bad_chars;
+  return c[0][0];
+}