Patchwork Testcase for PR45732

login
register
mail settings
Submitter Richard Guenther
Date Oct. 7, 2010, 2:58 p.m.
Message ID <alpine.LNX.2.00.1010071658190.8982@zhemvz.fhfr.qr>
Download mbox | patch
Permalink /patch/67063/
State New
Headers show

Comments

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

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];
+}