From a7280dfb8a2891529c8bdd3f6288787c61f7eabe Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 8 Jun 2010 21:53:10 +0200 Subject: [PATCH] basic-block.h (single_succ_edge, [...]): Do sanity checking with ENABLE_CHECKING only. * basic-block.h (single_succ_edge, single_pred_edge, ei_container, ei_next, ei_prev): Do sanity checking with ENABLE_CHECKING only. From-SVN: r160446 --- gcc/ChangeLog | 5 +++++ gcc/basic-block.h | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 33a4071047f..7b910df95a9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-06-08 Jan Hubicka + + * basic-block.h (single_succ_edge, single_pred_edge, ei_container, + ei_next, ei_prev): Do sanity checking with ENABLE_CHECKING only. + 2010-06-08 Sandra Loosemore PR tree-optimization/39874 diff --git a/gcc/basic-block.h b/gcc/basic-block.h index 1d8d53beb58..135c0c22a07 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -554,7 +554,9 @@ single_pred_p (const_basic_block bb) static inline edge single_succ_edge (const_basic_block bb) { +#ifdef ENABLE_CHECKING gcc_assert (single_succ_p (bb)); +#endif return EDGE_SUCC (bb, 0); } @@ -564,7 +566,9 @@ single_succ_edge (const_basic_block bb) static inline edge single_pred_edge (const_basic_block bb) { +#ifdef ENABLE_CHECKING gcc_assert (single_pred_p (bb)); +#endif return EDGE_PRED (bb, 0); } @@ -596,7 +600,9 @@ typedef struct { static inline VEC(edge,gc) * ei_container (edge_iterator i) { +#ifdef ENABLE_CHECKING gcc_assert (i.container); +#endif return *i.container; } @@ -647,7 +653,9 @@ ei_one_before_end_p (edge_iterator i) static inline void ei_next (edge_iterator *i) { +#ifdef ENABLE_CHECKING gcc_assert (i->index < EDGE_COUNT (ei_container (*i))); +#endif i->index++; } @@ -655,7 +663,9 @@ ei_next (edge_iterator *i) static inline void ei_prev (edge_iterator *i) { +#ifdef ENABLE_CHECKING gcc_assert (i->index > 0); +#endif i->index--; }