aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-04-30 08:06:49 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-04-30 08:06:49 +0000
commite9ff9caf265a47e747c12de69bcf5bd6db32843e (patch)
tree89764a65392e04dc94709cea493bd321464376f5 /gcc/tree-cfg.c
parentf8ed5150c3a1f821fb0cf266fc0fca76027fbef9 (diff)
downloadgcc-e9ff9caf265a47e747c12de69bcf5bd6db32843e.zip
gcc-e9ff9caf265a47e747c12de69bcf5bd6db32843e.tar.gz
gcc-e9ff9caf265a47e747c12de69bcf5bd6db32843e.tar.bz2
passes.c (execute_function_todo): Move TODO_verify_stmts and TODO_verify_ssa under the TODO_verify_il umbrella.
2014-04-30 Richard Biener <rguenther@suse.de> * passes.c (execute_function_todo): Move TODO_verify_stmts and TODO_verify_ssa under the TODO_verify_il umbrella. * tree-ssa.h (verify_ssa): Adjust prototype. * tree-ssa.c (verify_ssa): Add parameter to tell whether we should verify SSA operands. * tree-cfg.h (verify_gimple_in_cfg): Adjust prototype. * tree-cfg.c (verify_gimple_in_cfg): Add parameter to tell whether we should verify whether not throwing stmts have EH info. * graphite-scop-detection.c (create_sese_edges): Adjust. * tree-ssa-loop-manip.c (verify_loop_closed_ssa): Likewise. * tree-eh.c (lower_try_finally_switch): Do not add the default case label twice. From-SVN: r209928
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;