re PR tree-optimization/45071 (ICE: tree check: expected ssa_name, have integer_cst in inhibit_phi_insertion, at tree-ssa-pre.c:3278 with -ftree-pre -ftree-vectorize)

2010-07-26  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/45071
	* tree-ssa-sccvn.c  (vn_reference_maybe_forwprop_address): Always
	adjust op->opcode.

	* gcc.dg/pr45071.c: New testcase.

From-SVN: r162534
This commit is contained in:
Richard Guenther 2010-07-26 12:48:37 +00:00 committed by Richard Biener
parent 71ff73f3fb
commit e093ffe3c2
4 changed files with 48 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2010-07-26 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45071
* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Always
adjust op->opcode.
2010-07-26 Naveen.H.S <naveen.S@kpitcummins.com>
* config/v850/lib1funcs.asm (save_r2_r31, return_r2_r31,

View File

@ -1,3 +1,8 @@
2010-07-26 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45071
* gcc.dg/pr45071.c: New testcase.
2010-07-26 Tobias Burnus <burnus@net-b.de>
PR fortran/45066

View File

@ -0,0 +1,34 @@
/* { dg-do compile } */
/* { dg-options "-O -ftree-vrp -ftree-vectorize" } */
struct A
{
int i;
};
struct B
{
struct A a;
};
extern void f4 (void *);
inline void
f3 (struct A *a)
{
f4 (a);
while (a->i);
}
static inline void
f2 (struct B *b)
{
f3 (&b->a);
}
void
f1 ()
{
struct B *b = 0;
f2 (b);
}

View File

@ -1050,11 +1050,9 @@ vn_reference_maybe_forwprop_address (VEC (vn_reference_op_s, heap) **ops,
else
mem_op->off = -1;
if (TREE_CODE (op->op0) == SSA_NAME)
{
op->op0 = SSA_VAL (op->op0);
if (TREE_CODE (op->op0) != SSA_NAME)
op->opcode = TREE_CODE (op->op0);
}
op->op0 = SSA_VAL (op->op0);
if (TREE_CODE (op->op0) != SSA_NAME)
op->opcode = TREE_CODE (op->op0);
/* And recurse. */
if (TREE_CODE (op->op0) == SSA_NAME)