This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ICE caused by "[PATCH]: Rewrite tree level PRE"
The attached patch fixes the fortran failure.
Bootstrapped and regtested on i686-linux-gnu
Committed to mainline
2008-07-09 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-pre.c (phi_translate_1): Update placement of
add_to_value calls.
> Running /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ...
> FAIL: gfortran.fortran-torture/compile/pr32663.f, -O2 (internal compiler error)
> FAIL: gfortran.fortran-torture/compile/pr32663.f, -O2 -fomit-frame-pointer -finline-functions (internal compiler error)
> FAIL: gfortran.fortran-torture/compile/pr32663.f, -O2 -fomit-frame-pointer -finline-functions -funroll-loops (internal compiler error)
> FAIL: gfortran.fortran-torture/compile/pr32663.f, -O3 -g (internal compiler error)
>
> in gfortran.log:
> x/gcc/testsuite/gfortran.fortran-torture/compile/pr32663.f: In function 'dimoid':
> x/gcc/testsuite/gfortran.fortran-torture/compile/pr32663.f:1: internal compiler error: Segmentation fault
>
> brgds, H-P
>
Index: tree-ssa-pre.c
===================================================================
--- tree-ssa-pre.c (revision 137631)
+++ tree-ssa-pre.c (working copy)
@@ -1399,8 +1399,8 @@ phi_translate_1 (pre_expr expr, bitmap_s
if (constant != expr)
return constant;
get_or_alloc_expression_id (expr);
- add_to_value (new_val_id, expr);
}
+ add_to_value (new_val_id, expr);
}
phi_trans_add (oldexpr, expr, pred);
return expr;
@@ -1532,8 +1532,8 @@ phi_translate_1 (pre_expr expr, bitmap_s
result, new_val_id);
PRE_EXPR_REFERENCE (expr) = newref;
get_or_alloc_expression_id (expr);
- add_to_value (new_val_id, expr);
}
+ add_to_value (new_val_id, expr);
}
phi_trans_add (oldexpr, expr, pred);
return expr;