[tree-ssa] more debug updates

Richard Henderson rth@redhat.com
Sun Jan 18 07:24:00 GMT 2004


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;
 }



More information about the Gcc-patches mailing list