re PR tree-optimization/26179 (ICE while compiling mozilla in tree-ssa-pre.c)

2006-02-09  Andrew Pinski  <pinskia@physics.uc.edu>

        PR tree-opt/26179
        * g++.dg/opt/pr26179.C: New test.
2006-02-09  Andrew Pinski  <pinskia@physics.uc.edu>

        PR tree-opt/26179
        * tree-ssa-pre.c (create_component_ref_by_pieces):
        Handle RETURN_DECL like VAR_DECL.

From-SVN: r110801
This commit is contained in:
Andrew Pinski 2006-02-09 14:31:28 +00:00 committed by Andrew Pinski
parent 4853940ccb
commit 5230d88491
4 changed files with 34 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2006-02-09 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/26179
* tree-ssa-pre.c (create_component_ref_by_pieces):
Handle RETURN_DECL like VAR_DECL.
2006-02-09 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/26134

View File

@ -1,3 +1,8 @@
2006-02-09 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/26179
* g++.dg/opt/pr26179.C: New test.
2006-02-09 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/26134

View File

@ -0,0 +1,22 @@
/* The problem here is that Load PRE on the tree level
forgot to handle RETURN_DECL which causes us to ICE. */
// { dg-do compile }
// { dg-options "-O2" }
struct a
{
int i;
};
void h(struct a&);
void l(void);
struct a g(void)
{
struct a fl;
h(fl);
if (fl.i)
l();
fl.i+=2;
return fl;
}

View File

@ -2161,6 +2161,7 @@ create_component_ref_by_pieces (basic_block block, tree expr, tree stmts)
break;
case VAR_DECL:
case PARM_DECL:
case RESULT_DECL:
case SSA_NAME:
return genop;
default: