From 8c96cd51c7156218a1b26da8d08885649d234aee Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 19 Jan 2005 00:06:59 +0100 Subject: calls.c (expand_call): Check DECL_BUILT_IN_CLASS before accessing DECL_FUNCTION_CODE. * calls.c (expand_call): Check DECL_BUILT_IN_CLASS before accessing DECL_FUNCTION_CODE. * dojump.c (do_jump): Likewise. * gimplify.c (gimplify_call_expr): Likewise. * predict.c (expr_expected_value): Likewise. (strip_builtin_expect): Likewise. * tree-inline.c (estimate_num_insns_1): Likewise. * tree-ssa-loop-im.c (stmt_cost): Likewise * fold-const.c (fold): Test for BUILT_IN_NORMAL. (tree_expr_nonnegative_p): Likewise. From-SVN: r93864 --- gcc/fold-const.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'gcc/fold-const.c') diff --git a/gcc/fold-const.c b/gcc/fold-const.c index f22411d..cdefe76 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -8982,8 +8982,7 @@ fold (tree expr) tree arglist; if (fndecl - && DECL_BUILT_IN (fndecl) - && DECL_BUILT_IN_CLASS (fndecl) != BUILT_IN_MD + && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_STRLEN && (arglist = TREE_OPERAND (arg0, 1)) && TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) == POINTER_TYPE @@ -9809,9 +9808,7 @@ tree_expr_nonnegative_p (tree t) { tree fndecl = get_callee_fndecl (t); tree arglist = TREE_OPERAND (t, 1); - if (fndecl - && DECL_BUILT_IN (fndecl) - && DECL_BUILT_IN_CLASS (fndecl) != BUILT_IN_MD) + if (fndecl && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL) switch (DECL_FUNCTION_CODE (fndecl)) { #define CASE_BUILTIN_F(BUILT_IN_FN) \ -- cgit v1.1