diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2000-06-13 16:06:26 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2000-06-13 10:06:26 -0600 |
commit | efd0378bd3d72c68be063934ce60519149d6f390 (patch) | |
tree | 92faf5042f2368cd34d4381090cd55578905517c /gcc/final.c | |
parent | 97ce876c3291f763e20a4487e7920705182c1826 (diff) | |
download | gcc-efd0378bd3d72c68be063934ce60519149d6f390.zip gcc-efd0378bd3d72c68be063934ce60519149d6f390.tar.gz gcc-efd0378bd3d72c68be063934ce60519149d6f390.tar.bz2 |
final.c (final_scan_insn): Delete notes between cc0 setter and user when restarting from setter.
* final.c (final_scan_insn): Delete notes between cc0 setter and
user when restarting from setter.
From-SVN: r34517
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/final.c b/gcc/final.c index ae0e9cb..35782db 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -2943,10 +2943,28 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) needs to be reinserted. */ if (template == 0) { + rtx prev; + if (prev_nonnote_insn (insn) != last_ignored_compare) abort (); new_block = 0; - return prev_nonnote_insn (insn); + + /* We have already processed the notes between the setter and + the user. Make sure we don't process them again, this is + particularly important if one of the notes is a block + scope note or an EH note. */ + for (prev = insn; + prev != last_ignored_compare; + prev = PREV_INSN (prev)) + { + if (GET_CODE (prev) == NOTE) + { + NOTE_LINE_NUMBER (prev) = NOTE_INSN_DELETED; + NOTE_SOURCE_FILE (prev) = 0; + } + } + + return prev; } /* If the template is the string "#", it means that this insn must |