aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index a5f09ea..1918679 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -4785,7 +4785,7 @@ collect_subblocks (pointer_set_t *blocks, tree block)
/* Verify the GIMPLE statements in the CFG of FN. */
DEBUG_FUNCTION void
-verify_gimple_in_cfg (struct function *fn)
+verify_gimple_in_cfg (struct function *fn, bool verify_nothrow)
{
basic_block bb;
bool err = false;
@@ -4921,16 +4921,17 @@ verify_gimple_in_cfg (struct function *fn)
that they cannot throw, that we update other data structures
to match. */
lp_nr = lookup_stmt_eh_lp (stmt);
- if (lp_nr != 0)
+ if (lp_nr > 0)
{
if (!stmt_could_throw_p (stmt))
{
- error ("statement marked for throw, but doesn%'t");
- err2 |= true;
+ if (verify_nothrow)
+ {
+ error ("statement marked for throw, but doesn%'t");
+ err2 |= true;
+ }
}
- else if (lp_nr > 0
- && !gsi_one_before_end_p (gsi)
- && stmt_can_throw_internal (stmt))
+ else if (!gsi_one_before_end_p (gsi))
{
error ("statement marked for throw in middle of block");
err2 |= true;