diff options
author | Kenneth Zadeck <zadeck@naturalbridge.com> | 2007-10-11 22:31:55 +0000 |
---|---|---|
committer | Kenneth Zadeck <zadeck@gcc.gnu.org> | 2007-10-11 22:31:55 +0000 |
commit | 250d125cd3a406baba2b47de990b68650021c542 (patch) | |
tree | 6fca97e7fa634cb7828e03fc3e299c4086378acb /gcc/global.c | |
parent | 0c3de9003f8e0684664149aec9628c8c5b73d62a (diff) | |
download | gcc-250d125cd3a406baba2b47de990b68650021c542.zip gcc-250d125cd3a406baba2b47de990b68650021c542.tar.gz gcc-250d125cd3a406baba2b47de990b68650021c542.tar.bz2 |
re PR rtl-optimization/33676 (libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer)
2007-10-11 Kenneth Zadeck <zadeck@naturalbridge.com>
PR middle-end/33676
* global.c (build_insn_chain): Include insn that occur between
basic blocks.
2007-10-11 Kenneth Zadeck <zadeck@naturalbridge.com>
PR middle-end/33676
* gcc.dg/torture/pr33676.c: New.
From-SVN: r129244
Diffstat (limited to 'gcc/global.c')
-rw-r--r-- | gcc/global.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/global.c b/gcc/global.c index 1dc63d3..69257bc 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -1575,6 +1575,41 @@ build_insn_chain (void) } } } + + /* FIXME!! The following code is a disaster. Reload needs to see the + labels and jump tables that are just hanging out in between + the basic blocks. See pr33676. */ + + insn = BB_HEAD (bb); + + /* Skip over the barriers and cruft. */ + while (insn && (BARRIER_P (insn) || NOTE_P (insn) || BLOCK_FOR_INSN (insn) == bb)) + insn = PREV_INSN (insn); + + /* While we add anything except barriers and notes, the focus is + to get the labels and jump tables into the + reload_insn_chain. */ + while (insn) + { + if (!NOTE_P (insn) && !BARRIER_P (insn)) + { + if (BLOCK_FOR_INSN (insn)) + break; + + c = new_insn_chain (); + c->next = next; + next = c; + *p = c; + p = &c->prev; + + c->insn = insn; + /* The block makes no sense here, but it is what the old + code did. */ + c->block = bb->index; + bitmap_copy (&c->live_throughout, live_relevant_regs); + } + insn = PREV_INSN (insn); + } } for (i = 0; i < (unsigned int)max_regno; i++) |