This fixes a bug exposed by --enable-checking=release. The patch to templatize the tree_check* routines had moved tree_operand_length into an #ifdef ENABLE_CHECKING block. This breaks builds with checking disabled.
Tested on x86_64. Committed. 2012-05-19 Diego Novillo <dnovi...@google.com> * tree.h (tree_operand_length): Move out of #ifdef ENABLE_CHECKING. Index: gcc/tree.h =================================================================== --- gcc/tree.h (revision 187678) +++ gcc/tree.h (working copy) @@ -3831,18 +3831,6 @@ return &__t->omp_clause.ops[__i]; } -/* Compute the number of operands in an expression node NODE. For - tcc_vl_exp nodes like CALL_EXPRs, this is stored in the node itself, - otherwise it is looked up from the node's code. */ -static inline int -tree_operand_length (const_tree node) -{ - if (VL_EXP_CLASS_P (node)) - return VL_EXP_OPERAND_LENGTH (node); - else - return TREE_CODE_LENGTH (TREE_CODE (node)); -} - /* Special checks for TREE_OPERANDs. */ template <typename Tree> inline tree * @@ -6045,6 +6033,18 @@ void init_inline_once (void); +/* Compute the number of operands in an expression node NODE. For + tcc_vl_exp nodes like CALL_EXPRs, this is stored in the node itself, + otherwise it is looked up from the node's code. */ +static inline int +tree_operand_length (const_tree node) +{ + if (VL_EXP_CLASS_P (node)) + return VL_EXP_OPERAND_LENGTH (node); + else + return TREE_CODE_LENGTH (TREE_CODE (node)); +} + /* Abstract iterators for CALL_EXPRs. These static inline definitions have to go towards the end of tree.h so that union tree_node is fully defined by this point. */