From: pinskia Date: Tue, 21 Mar 2006 18:58:50 +0000 (+0000) Subject: 2006-03-21 Andrew Pinski X-Git-Tag: upstream/4.9.2~55285 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8168e38d7deee31d7725e96db8729a20f9f00c3a;p=platform%2Fupstream%2Flinaro-gcc.git 2006-03-21 Andrew Pinski PR tree-opt/26781 * tree-ssa-pre.c (create_component_ref_by_pieces): Handle STRING_CST. 2006-03-21 Andrew Pinski PR tree-opt/26781 * gcc.c-torture/compile/pr26781-1.c: New test. * gcc.c-torture/compile/pr26781-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112254 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 + + PR tree-opt/26781 + * tree-ssa-pre.c (create_component_ref_by_pieces): + Handle STRING_CST. + 2006-03-21 Jakub Jelinek 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 + + 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 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 ();