This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] more debug updates
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 17 Jan 2004 23:24:47 -0800
- Subject: [tree-ssa] more debug updates
I forgot about TREE_BLOCK when I was worrying about EXPR_LOCUS.
r~
* tree-complex.c (gimplify_val): Copy TREE_BLOCK.
Index: tree-complex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-complex.c,v
retrieving revision 1.1.2.5
diff -c -p -d -u -r1.1.2.5 tree-complex.c
--- tree-complex.c 18 Jan 2004 03:15:57 -0000 1.1.2.5
+++ tree-complex.c 18 Jan 2004 07:20:12 -0000
@@ -46,15 +46,19 @@ make_temp (tree type)
static tree
gimplify_val (block_stmt_iterator *bsi, tree type, tree exp)
{
- tree t, x;
+ tree t, new_stmt, orig_stmt;
if (is_gimple_val (exp))
return exp;
t = make_temp (type);
- x = build (MODIFY_EXPR, type, t, exp);
- SET_EXPR_LOCUS (x, EXPR_LOCUS (bsi_stmt (*bsi)));
- bsi_insert_before (bsi, x, BSI_SAME_STMT);
+ new_stmt = build (MODIFY_EXPR, type, t, exp);
+
+ orig_stmt = bsi_stmt (*bsi);
+ SET_EXPR_LOCUS (new_stmt, EXPR_LOCUS (orig_stmt));
+ TREE_BLOCK (new_stmt) = TREE_BLOCK (orig_stmt);
+
+ bsi_insert_before (bsi, new_stmt, BSI_SAME_STMT);
return t;
}