diff options
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r-- | gcc/tree-eh.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 9c17c1e092e..c117013810d 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -96,7 +96,7 @@ add_stmt_to_eh_lp_fn (struct function *ifun, gimple t, int num) gcc_assert (num != 0); - n = GGC_NEW (struct throw_stmt_node); + n = ggc_alloc_throw_stmt_node (); n->stmt = t; n->lp_nr = num; @@ -951,12 +951,12 @@ lower_try_finally_fallthru_label (struct leh_tf_state *tf) return label; } -/* A subroutine of lower_try_finally. If lang_protect_cleanup_actions - returns non-null, then the language requires that the exception path out - of a try_finally be treated specially. To wit: the code within the - finally block may not itself throw an exception. We have two choices here. - First we can duplicate the finally block and wrap it in a must_not_throw - region. Second, we can generate code like +/* A subroutine of lower_try_finally. If the eh_protect_cleanup_actions + langhook returns non-null, then the language requires that the exception + path out of a try_finally be treated specially. To wit: the code within + the finally block may not itself throw an exception. We have two choices + here. First we can duplicate the finally block and wrap it in a + must_not_throw region. Second, we can generate code like try { finally_block; @@ -983,9 +983,9 @@ honor_protect_cleanup_actions (struct leh_state *outer_state, gimple x; /* First check for nothing to do. */ - if (lang_protect_cleanup_actions == NULL) + if (lang_hooks.eh_protect_cleanup_actions == NULL) return; - protect_cleanup_actions = lang_protect_cleanup_actions (); + protect_cleanup_actions = lang_hooks.eh_protect_cleanup_actions (); if (protect_cleanup_actions == NULL) return; @@ -2437,6 +2437,10 @@ tree_could_trap_p (tree expr) return false; return !in_array_bounds_p (expr); + case MEM_REF: + if (TREE_CODE (TREE_OPERAND (expr, 0)) == ADDR_EXPR) + return false; + /* Fallthru. */ case INDIRECT_REF: case ALIGN_INDIRECT_REF: case MISALIGNED_INDIRECT_REF: |