re PR tree-optimization/45732 (ICE: in bit_value_unop, at tree-ssa-ccp.c:1861 at...
authorRichard Guenther <rguenther@suse.de>
Thu, 7 Oct 2010 15:00:18 +0000 (15:00 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 7 Oct 2010 15:00:18 +0000 (15:00 +0000)
2010-10-07  Richard Guenther  <rguenther@suse.de>

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

From-SVN: r165120

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr45732.c [new file with mode: 0644]

index 2f1f761..a38c250 100644 (file)
@@ -1,3 +1,8 @@
+2010-10-07  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/45732
+       * gcc.dg/torture/pr45732.c: New testcase.
+
 2010-10-07  Iain Sandoe  <iains@gcc.gnu.org>
 
        * objc.dg/foreach-1.m: Adjust for -fnext-runtime compatibility.
diff --git a/gcc/testsuite/gcc.dg/torture/pr45732.c b/gcc/testsuite/gcc.dg/torture/pr45732.c
new file mode 100644 (file)
index 0000000..04ceaa2
--- /dev/null
@@ -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];
+}