diff options
author | Richard Henderson <rth@cygnus.com> | 2000-07-08 14:17:51 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2000-07-08 14:17:51 -0700 |
commit | 0ac76ad9eb17dd98b6008d083aa31442cbfa0410 (patch) | |
tree | 2a4f85145da2b66955f3fdbbb4bc25085518d1b1 /gcc/final.c | |
parent | bfb9dc7faa9330d05c109e8a40710b752dddea14 (diff) | |
download | gcc-0ac76ad9eb17dd98b6008d083aa31442cbfa0410.zip gcc-0ac76ad9eb17dd98b6008d083aa31442cbfa0410.tar.gz gcc-0ac76ad9eb17dd98b6008d083aa31442cbfa0410.tar.bz2 |
final.c (final): Do not abort when reg-stack introduces a new insn.
* final.c (final): Do not abort when reg-stack introduces
a new insn.
From-SVN: r34927
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/gcc/final.c b/gcc/final.c index 3537bcf..be4a01e 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -2014,14 +2014,23 @@ final (first, file, optimize, prescan) for (insn = NEXT_INSN (first); insn;) { #ifdef HAVE_ATTR_length -#ifdef ENABLE_CHECKING - /* This can be triggered by bugs elsewhere in the compiler if - new insns are created after init_insn_lengths is called. */ if (INSN_UID (insn) >= insn_lengths_max_uid) - abort (); -#endif - insn_current_address = insn_addresses[INSN_UID (insn)]; + { +#ifdef STACK_REGS + /* Irritatingly, the reg-stack pass is creating new instructions + and because of REG_DEAD note abuse it has to run after + shorten_branches. Fake address of -1 then. */ + insn_current_address = -1; +#else + /* This can be triggered by bugs elsewhere in the compiler if + new insns are created after init_insn_lengths is called. */ + abort (); #endif + } + else + insn_current_address = insn_addresses[INSN_UID (insn)]; +#endif /* HAVE_ATTR_length */ + insn = final_scan_insn (insn, file, optimize, prescan, 0); } |