From 47e538e888290454cb6773b33834951923e7f200 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Mon, 9 Jun 1997 17:24:32 -0400 Subject: [PATCH] (expand_builtin, case BUILT_IN_FRAME_ADDRESS): Use correct function name in error message. From-SVN: r14191 --- gcc/expr.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gcc/expr.c b/gcc/expr.c index afe6a3c93ab1..537eefba8aa7 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -8480,14 +8480,13 @@ expand_builtin (exp, target, subtarget, mode, ignore) if (arglist == 0) /* Warning about missing arg was already issued. */ return const0_rtx; - else if (TREE_CODE (TREE_VALUE (arglist)) != INTEGER_CST) + else if (TREE_CODE (TREE_VALUE (arglist)) != INTEGER_CST + || tree_int_cst_sgn (TREE_VALUE (arglist)) < 0) { - error ("invalid arg to `__builtin_return_address'"); - return const0_rtx; - } - else if (tree_int_cst_sgn (TREE_VALUE (arglist)) < 0) - { - error ("invalid arg to `__builtin_return_address'"); + if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_FRAME_ADDRESS) + error ("invalid arg to `__builtin_frame_address'"); + else + error ("invalid arg to `__builtin_return_address'"); return const0_rtx; } else -- 2.43.5