diff options
author | Richard Guenther <rguenther@suse.de> | 2007-01-24 13:49:18 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2007-01-24 13:49:18 +0000 |
commit | 9d972b2dd319f761fe3beb4cdbcde0e1412da49e (patch) | |
tree | 27169861ce34178f6ce610255ca7f1b7a9b7ab2b /gcc/builtins.c | |
parent | cf227303461b367efbb57f7e4f9425c3f15f1132 (diff) | |
download | gcc-9d972b2dd319f761fe3beb4cdbcde0e1412da49e.zip gcc-9d972b2dd319f761fe3beb4cdbcde0e1412da49e.tar.gz gcc-9d972b2dd319f761fe3beb4cdbcde0e1412da49e.tar.bz2 |
builtins.c (expand_builtin_cexpi): Get the fndecl for cexp in the correct way.
2007-01-24 Richard Guenther <rguenther@suse.de>
* builtins.c (expand_builtin_cexpi): Get the fndecl
for cexp in the correct way.
From-SVN: r121114
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index bf57c7b..240231e 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); |