diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-22 08:42:57 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-22 08:42:57 +0000 |
commit | 8a1586baa04be64c3347723371fbd6b8ce78a049 (patch) | |
tree | ce35507892fd6bad041ced4cbba6f9dba4b58d20 /gcc | |
parent | 720f6ebb975a3575cc0cc90587e40e26cdf21279 (diff) | |
download | gcc-8a1586baa04be64c3347723371fbd6b8ce78a049.tar.gz |
PR target/32325
* except.c (finish_eh_generation): Call commit_edge_insertions if
there are insns queued on the entry edge.
* config/alpha/alpha.c (alpha_gp_save_rtx): Insert the insns on
the entry edge.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128665 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.c | 9 | ||||
-rw-r--r-- | gcc/except.c | 4 |
3 files changed, 19 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 116aa78558a..20bf0529736 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2007-09-22 Eric Botcazou <ebotcazou@adacore.com> + + PR target/32325 + * except.c (finish_eh_generation): Call commit_edge_insertions if + there are insns queued on the entry edge. + * config/alpha/alpha.c (alpha_gp_save_rtx): Insert the insns on + the entry edge. + 2007-09-22 Richard Sandiford <rsandifo@nildram.co.uk> * doc/sourcebuild.texi (dg-add-c99-runtime-options): Document. diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 48696b5ddbd..fee5cd11115 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -4780,7 +4780,14 @@ alpha_gp_save_rtx (void) seq = get_insns (); end_sequence (); - emit_insn_at_entry (seq); + + /* We used to simply emit the sequence after entry_of_function. + However this breaks the CFG if the first instruction in the + first block is not the NOTE_INSN_BASIC_BLOCK, for example a + label. Emit the sequence properly on the edge. We are only + invoked from dw2_build_landing_pads and finish_eh_generation + will call commit_edge_insertions thanks to a kludge. */ + insert_insn_on_edge (seq, single_succ_edge (ENTRY_BLOCK_PTR)); cfun->machine->gp_save_rtx = m; } diff --git a/gcc/except.c b/gcc/except.c index f3204eb863a..fe98299450d 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -2107,7 +2107,9 @@ finish_eh_generation (void) /* We've totally changed the CFG. Start over. */ find_exception_handler_labels (); break_superblocks (); - if (USING_SJLJ_EXCEPTIONS) + if (USING_SJLJ_EXCEPTIONS + /* Kludge for Alpha/Tru64 (see alpha_gp_save_rtx). */ + || single_succ_edge (ENTRY_BLOCK_PTR)->insns.r) commit_edge_insertions (); FOR_EACH_BB (bb) { |