yann@402: See http://gcc.gnu.org/PR21173 yann@402: This is a fix for a last minute brown-bag bug with gcc-4.0.0 yann@402: yann@402: ------- Additional Comment #24 From CVS Commits 2005-04-25 14:03 [reply] ------- yann@402: Subject: Bug 21173 yann@402: yann@402: CVSROOT: /cvs/gcc yann@402: Module name: gcc yann@402: Branch: gcc-4_0-branch yann@402: Changes by: dberlin@gcc.gnu.org 2005-04-25 14:02:38 yann@402: yann@402: Modified files: yann@402: gcc : ChangeLog tree-ssa-pre.c yann@402: yann@402: Log message: yann@402: 2005-04-25 Daniel Berlin yann@402: yann@402: Fix PR tree-optimization/21173 yann@402: yann@402: * tree-ssa-pre.c (create_expression_by_pieces): Call unshare_expr yann@402: on things we pass to force_gimple_operand. Don't try to special yann@402: case min_invariants. yann@402: yann@402: Patches: yann@402: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.192&r2=2.7592.2.193 yann@402: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-pre.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.65.4.2&r2=2.65.4.3 yann@402: yann@402: =================================================================== yann@402: RCS file: /cvs/gcc/gcc/gcc/tree-ssa-pre.c,v yann@402: retrieving revision 2.65.4.2 yann@402: retrieving revision 2.65.4.3 yann@402: diff -u -r2.65.4.2 -r2.65.4.3 yann@402: --- gcc/gcc/tree-ssa-pre.c 2005/04/17 23:40:31 2.65.4.2 yann@402: +++ gcc/gcc/tree-ssa-pre.c 2005/04/25 14:02:31 2.65.4.3 yann@402: @@ -1330,7 +1330,8 @@ yann@402: yann@402: folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr), yann@402: genop1, genop2)); yann@402: - newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL); yann@402: + newexpr = force_gimple_operand (unshare_expr (folded), yann@402: + &forced_stmts, false, NULL); yann@402: if (forced_stmts) yann@402: { yann@402: tsi = tsi_start (forced_stmts); yann@402: @@ -1372,14 +1373,8 @@ yann@402: add_referenced_tmp_var (temp); yann@402: folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr), yann@402: genop1)); yann@402: - /* If the generated operand is already GIMPLE min_invariant yann@402: - just use it instead of calling force_gimple_operand on it, yann@402: - since that may make it not invariant by copying it into an yann@402: - assignment. */ yann@402: - if (!is_gimple_min_invariant (genop1)) yann@402: - newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL); yann@402: - else yann@402: - newexpr = genop1; yann@402: + newexpr = force_gimple_operand (unshare_expr (folded), yann@402: + &forced_stmts, false, NULL); yann@402: if (forced_stmts) yann@402: { yann@402: tsi = tsi_start (forced_stmts); yann@402: yann@402: 0K . 1.24 MB/s yann@402: yann@402: 13:16:54 (1.24 MB/s) - `-' saved [1303] yann@402: