aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2006-03-21 18:58:50 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2006-03-21 10:58:50 -0800
commit5ded46ebfa8a73cd3931b3c1831d38dc4acea753 (patch)
tree3f7b4f7b4a1dc06b141f1d996288786d9f041787
parent3c9bb46ee9c2f34a129c6c4489778092de2a220c (diff)
downloadgcc-5ded46ebfa8a73cd3931b3c1831d38dc4acea753.zip
gcc-5ded46ebfa8a73cd3931b3c1831d38dc4acea753.tar.gz
gcc-5ded46ebfa8a73cd3931b3c1831d38dc4acea753.tar.bz2
re PR tree-optimization/26781 (ICE in tree-ssa-pre.c at create_component_ref_by_piec)
2006-03-21 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/26781 * tree-ssa-pre.c (create_component_ref_by_pieces): Handle STRING_CST. 2006-03-21 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/26781 * gcc.c-torture/compile/pr26781-1.c: New test. * gcc.c-torture/compile/pr26781-2.c: New test. From-SVN: r112254
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr26781-1.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr26781-2.c11
-rw-r--r--gcc/tree-ssa-pre.c1
5 files changed, 35 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 58504cf..cc64df9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2006-03-21 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR tree-opt/26781
+ * tree-ssa-pre.c (create_component_ref_by_pieces):
+ Handle STRING_CST.
+
2006-03-21 Jakub Jelinek <jakub@redhat.com>
PR c++/26690
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2c983ad..eafe67c1 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2006-03-21 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR tree-opt/26781
+ * gcc.c-torture/compile/pr26781-1.c: New test.
+ * gcc.c-torture/compile/pr26781-2.c: New test.
+
2006-03-21 Jakub Jelinek <jakub@redhat.com>
PR c++/26690
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr26781-1.c b/gcc/testsuite/gcc.c-torture/compile/pr26781-1.c
new file mode 100644
index 0000000..028919e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr26781-1.c
@@ -0,0 +1,11 @@
+void zconfdump(void)
+{
+ char *p, *p2;
+ for (p2 = p; p2; )
+ {
+ char __a0, __a1, __a2;
+ __a0 = ((__const char *) ("\"\\"))[0];
+ if (__a0)
+ return;
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr26781-2.c b/gcc/testsuite/gcc.c-torture/compile/pr26781-2.c
new file mode 100644
index 0000000..47168fd
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr26781-2.c
@@ -0,0 +1,11 @@
+void zconfdump(__SIZE_TYPE__ i)
+{
+ for (;;)
+ {
+ char __a0;
+ __a0 = ("\"\\")[i];
+ if (__a0)
+ return;
+ }
+}
+
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index eea38c3..e925621 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -2246,6 +2246,7 @@ create_component_ref_by_pieces (basic_block block, tree expr, tree stmts)
case PARM_DECL:
case RESULT_DECL:
case SSA_NAME:
+ case STRING_CST:
return genop;
default:
gcc_unreachable ();