From 0ecbc158e2632910bf72f97ce5e816b204833993 Mon Sep 17 00:00:00 2001 From: rguenth Date: Wed, 24 Jan 2007 13:49:18 +0000 Subject: 2007-01-24 Richard Guenther * builtins.c (expand_builtin_cexpi): Get the fndecl for cexp in the correct way. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121114 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/builtins.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gcc/builtins.c') diff --git a/gcc/builtins.c b/gcc/builtins.c index bf57c7bf55e..240231e538b 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -2283,13 +2283,18 @@ expand_builtin_cexpi (tree exp, rtx target, rtx subtarget) } else { - tree call, fn, narg; + tree call, fn = NULL_TREE, narg; tree ctype = build_complex_type (type); /* We can expand via the C99 cexp function. */ gcc_assert (TARGET_C99_FUNCTIONS); - fn = mathfn_built_in (ctype, BUILT_IN_CEXP); + if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CEXPIF) + fn = built_in_decls[BUILT_IN_CEXPF]; + else if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CEXPI) + fn = built_in_decls[BUILT_IN_CEXP]; + else if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CEXPIL) + fn = built_in_decls[BUILT_IN_CEXPL]; narg = fold_build2 (COMPLEX_EXPR, ctype, build_real (type, dconst0), arg); -- cgit v1.2.1