]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/17925 (Gotos loses their locations)
authorAndrew Pinski <pinskia@physics.uc.edu>
Sun, 17 Oct 2004 20:07:34 +0000 (20:07 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Sun, 17 Oct 2004 20:07:34 +0000 (13:07 -0700)
2004-10-17  Andrew Pinski  <pinskia@physics.uc.edu>

        PR middle-end/17925
        * cfgexpand.c (expand_gimple_cond_expr): Emit line notes for next basic
        block if there is a goto with a locus.

From-SVN: r89182

gcc/ChangeLog
gcc/cfgexpand.c

index 811c61aadece4fee8309afc64b4dd1787950419a..9bbb498018ca2ad558021fa46f2970009d94c198 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-17  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR middle-end/17925
+       * cfgexpand.c (expand_gimple_cond_expr): Emit line notes for next basic
+       block if there is a goto with a locus.
+
 2004-10-17  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/elfos.h, config/gofast.h, config/interix.h,
index a04f3ae42314a40072c9647618491e98a0fe3f80..df0c695b8228f2b9b818651df33102993340854d 100644 (file)
@@ -886,6 +886,8 @@ expand_gimple_cond_expr (basic_block bb, tree stmt)
       jumpif (pred, label_rtx (GOTO_DESTINATION (then_exp)));
       add_reg_br_prob_note (dump_file, last, true_edge->probability);
       maybe_dump_rtl_for_tree_stmt (stmt, last);
+      if (EXPR_LOCUS (then_exp))
+       emit_line_note (*(EXPR_LOCUS (then_exp)));
       return NULL;
     }
   if (TREE_CODE (else_exp) == GOTO_EXPR && IS_EMPTY_STMT (then_exp))
@@ -893,6 +895,8 @@ expand_gimple_cond_expr (basic_block bb, tree stmt)
       jumpifnot (pred, label_rtx (GOTO_DESTINATION (else_exp)));
       add_reg_br_prob_note (dump_file, last, false_edge->probability);
       maybe_dump_rtl_for_tree_stmt (stmt, last);
+      if (EXPR_LOCUS (else_exp))
+       emit_line_note (*(EXPR_LOCUS (else_exp)));
       return NULL;
     }
   gcc_assert (TREE_CODE (then_exp) == GOTO_EXPR
@@ -922,6 +926,9 @@ expand_gimple_cond_expr (basic_block bb, tree stmt)
   update_bb_for_insn (new_bb);
 
   maybe_dump_rtl_for_tree_stmt (stmt, last2);
+  
+  if (EXPR_LOCUS (else_exp))
+    emit_line_note (*(EXPR_LOCUS (else_exp)));
 
   return new_bb;
 }