Commit 9d972b2d by Richard Guenther Committed by Richard Biener

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
parent cf227303
2007-01-24 Richard Guenther <rguenther@suse.de>
* builtins.c (expand_builtin_cexpi): Get the fndecl
for cexp in the correct way.
2007-01-24 Jan Hubicka <jh@suse.cz> 2007-01-24 Jan Hubicka <jh@suse.cz>
* tree-ssa-dce.c (eliminate_unnecesary_stmts): Remove dead LHS of calls. * tree-ssa-dce.c (eliminate_unnecesary_stmts): Remove dead LHS of calls.
......
...@@ -2283,13 +2283,18 @@ expand_builtin_cexpi (tree exp, rtx target, rtx subtarget) ...@@ -2283,13 +2283,18 @@ expand_builtin_cexpi (tree exp, rtx target, rtx subtarget)
} }
else else
{ {
tree call, fn, narg; tree call, fn = NULL_TREE, narg;
tree ctype = build_complex_type (type); tree ctype = build_complex_type (type);
/* We can expand via the C99 cexp function. */ /* We can expand via the C99 cexp function. */
gcc_assert (TARGET_C99_FUNCTIONS); 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, narg = fold_build2 (COMPLEX_EXPR, ctype,
build_real (type, dconst0), arg); build_real (type, dconst0), arg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment