From d53e8ef490e59839909b536b1cf1d8aaaecfe43f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 20 Jun 2018 16:42:19 +0200 Subject: [PATCH] cfgrtl.c (rtl_verify_edges): Formatting fix. * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any EDGE_EH edges, verify they are all EDGE_EH. From-SVN: r261803 --- gcc/ChangeLog | 5 +++++ gcc/cfgrtl.c | 31 ++++++++++++++++++++++--------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f7a2ee7ae4d..86db35fde19 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-06-20 Jakub Jelinek + + * 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 * ginclude/stddef.h: Limit #include to NetBSD. diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index de704ce16d0..19cef2272b6 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -2540,15 +2540,15 @@ rtl_verify_edges (void) 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)) { @@ -2606,6 +2606,19 @@ rtl_verify_edges (void) 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 -- 2.30.2