diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1b8a1082d40..d6a0d5694d8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-11-05 Dehao Chen + + * final.c (reemit_insn_block_notes): Do not change scope if insn + location is UNKNOWN_LOCATION. + 2012-11-05 Joern Rennecke * doc/md.texi (Defining Attributes): Document that we are defining diff --git a/gcc/final.c b/gcc/final.c index 81a679d63fd..f69963d6335 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -1616,7 +1616,12 @@ reemit_insn_block_notes (void) insn_scope (XVECEXP (body, 0, i))); } if (! this_block) - this_block = DECL_INITIAL (cfun->decl); + { + if (INSN_LOCATION (insn) == UNKNOWN_LOCATION) + continue; + else + this_block = DECL_INITIAL (cfun->decl); + } if (this_block != cur_block) {