This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Testcase for PR45732
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 7 Oct 2010 16:58:36 +0200 (CEST)
- Subject: [PATCH] Testcase for PR45732
Committed.
Richard.
2010-10-07 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45732
* gcc.dg/torture/pr45732.c: New testcase.
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];
+}