* tree-cfg.c (verify_gimple_in_cfg): Verify no non-label stmts
with the exception of debug begin stmt markers appear before
labels.
From-SVN: r255611
2017-12-13 Jakub Jelinek <jakub@redhat.com>
+ * tree-cfg.c (verify_gimple_in_cfg): Verify no non-label stmts
+ with the exception of debug begin stmt markers appear before
+ labels.
+
PR bootstrap/83396
* final.c (rest_of_handle_final): Call variable_tracking_main only
if !flag_var_tracking.
err |= err2;
}
+ bool label_allowed = true;
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
gimple *stmt = gsi_stmt (gsi);
err2 = true;
}
+ /* Labels may be preceded only by debug markers, not debug bind
+ or source bind or any other statements. */
+ if (gimple_code (stmt) == GIMPLE_LABEL)
+ {
+ if (!label_allowed)
+ {
+ error ("gimple label in the middle of a basic block");
+ err2 = true;
+ }
+ }
+ else if (!gimple_debug_begin_stmt_p (stmt))
+ label_allowed = false;
+
err2 |= verify_gimple_stmt (stmt);
err2 |= verify_location (&blocks, gimple_location (stmt));