+2018-06-20 Jakub Jelinek <jakub@redhat.com>
+
+ * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
+ EDGE_EH edges, verify they are all EDGE_EH.
+
2018-06-20 Maya Rashish <coypu@sdf.org>
* ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
n_abnormal++;
}
- if (!has_crossing_edge
- && JUMP_P (BB_END (bb))
- && CROSSING_JUMP_P (BB_END (bb)))
- {
- print_rtl_with_bb (stderr, get_insns (), TDF_BLOCKS | TDF_DETAILS);
- error ("Region crossing jump across same section in bb %i",
- bb->index);
- err = 1;
- }
+ if (!has_crossing_edge
+ && JUMP_P (BB_END (bb))
+ && CROSSING_JUMP_P (BB_END (bb)))
+ {
+ print_rtl_with_bb (stderr, get_insns (), TDF_BLOCKS | TDF_DETAILS);
+ error ("Region crossing jump across same section in bb %i",
+ bb->index);
+ err = 1;
+ }
if (n_eh && !find_reg_note (BB_END (bb), REG_EH_REGION, NULL_RTX))
{
error ("abnormal edges for no purpose in bb %i", bb->index);
err = 1;
}
+
+ int has_eh = -1;
+ FOR_EACH_EDGE (e, ei, bb->preds)
+ {
+ if (has_eh == -1)
+ has_eh = (e->flags & EDGE_EH);
+ if ((e->flags & EDGE_EH) == has_eh)
+ continue;
+ error ("EH incoming edge mixed with non-EH incoming edges "
+ "in bb %i", bb->index);
+ err = 1;
+ break;
+ }
}
/* If there are partitions, do a sanity check on them: A basic block in