aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2000-03-08 16:30:17 -0500
committerJason Merrill <jason@gcc.gnu.org>2000-03-08 16:30:17 -0500
commit6814a8a0bbfca8cd39b2e68ab74a1f3bd2e19c5a (patch)
tree5ebf91de1a0adafc35062b23a2450bd867d352f7 /gcc/flow.c
parent2b01d2d999a4fa1e0ce9b7b9d85ebaedfc726043 (diff)
downloadgcc-6814a8a0bbfca8cd39b2e68ab74a1f3bd2e19c5a.zip
gcc-6814a8a0bbfca8cd39b2e68ab74a1f3bd2e19c5a.tar.gz
gcc-6814a8a0bbfca8cd39b2e68ab74a1f3bd2e19c5a.tar.bz2
flow.c (count_basic_blocks, [...]): A rethrow can occur outside of an EH region.
* flow.c (count_basic_blocks, find_basic_blocks_1): A rethrow can occur outside of an EH region. * except.c: Correct comments about rethrow behavior. (rethrow_symbol_map): Do nothing if !flag_new_exceptions. * flow.c (make_edges): Always call make_eh_edge for calls. From-SVN: r32432
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index e134794..5704835 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -469,8 +469,9 @@ count_basic_blocks (f)
prev_call = insn;
call_had_abnormal_edge = 0;
- /* If there is a specified EH region, we have an edge. */
- if (eh_region && region > 0)
+ /* If there is an EH region or rethrow, we have an edge. */
+ if ((eh_region && region > 0)
+ || find_reg_note (insn, REG_EH_RETHROW, NULL_RTX))
call_had_abnormal_edge = 1;
else
{
@@ -541,8 +542,9 @@ find_basic_blocks_1 (f)
int region = (note ? XWINT (XEXP (note, 0), 0) : 1);
call_has_abnormal_edge = 0;
- /* If there is an EH region, we have an edge. */
- if (eh_list && region > 0)
+ /* If there is an EH region or rethrow, we have an edge. */
+ if ((eh_list && region > 0)
+ || find_reg_note (insn, REG_EH_RETHROW, NULL_RTX))
call_has_abnormal_edge = 1;
else
{
@@ -983,10 +985,10 @@ make_edges (label_value_list)
if (code == CALL_INSN || asynchronous_exceptions)
{
- /* If there's an EH region active at the end of a block,
- add the appropriate edges. */
- if (bb->eh_end >= 0)
- make_eh_edge (edge_cache, eh_nest_info, bb, insn, bb->eh_end);
+ /* Add any appropriate EH edges. We do this unconditionally
+ since there may be a REG_EH_REGION or REG_EH_RETHROW note
+ on the call, and this needn't be within an EH region. */
+ make_eh_edge (edge_cache, eh_nest_info, bb, insn, bb->eh_end);
/* If we have asynchronous exceptions, do the same for *all*
exception regions active in the block. */
@@ -1778,7 +1780,7 @@ delete_eh_regions ()
{
int num = NOTE_EH_HANDLER (insn);
/* A NULL handler indicates a region is no longer needed,
- as long as it isn't the target of a rethrow. */
+ as long as its rethrow label isn't used. */
if (get_first_handler (num) == NULL && ! rethrow_used (num))
{
NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;