re PR middle-end/34233 (ICE: get_callee_fndecl, at tree.c:6592)

2007-11-26  Richard Guenther  <rguenther@suse.de>

	PR middle-end/34233
	* builtins.c (expand_builtin_pow): Use expand_expr to expand
	the result of build_call_expr.

	* gcc.dg/pr34233.c: New testcase.

From-SVN: r130436
This commit is contained in:
Richard Guenther 2007-11-26 12:30:40 +00:00 committed by Richard Biener
parent b8111d54ed
commit 5e043dc905
4 changed files with 22 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2007-11-26 Richard Guenther <rguenther@suse.de>
PR middle-end/34233
* builtins.c (expand_builtin_pow): Use expand_expr to expand
the result of build_call_expr.
2007-11-26 Steven Bosscher <stevenb.gcc@gmail.com>
Revital Eres <eres@il.ibm.com>

View File

@ -2938,7 +2938,9 @@ expand_builtin_pow (tree exp, rtx target, rtx subtarget)
|| n == 1))
{
tree call_expr = build_call_expr (fn, 1, narg0);
op = expand_builtin (call_expr, NULL_RTX, subtarget, mode, 0);
/* Use expand_expr in case the newly built call expression
was folded to a non-call. */
op = expand_expr (call_expr, subtarget, mode, EXPAND_NORMAL);
if (n != 1)
{
op2 = expand_expr (narg0, subtarget, VOIDmode, EXPAND_NORMAL);

View File

@ -1,3 +1,8 @@
2007-11-26 Richard Guenther <rguenther@suse.de>
PR middle-end/34233
* gcc.dg/pr34233.c: New testcase.
2007-11-26 Steven Bosscher <stevenb.gcc@gmail.com>
Revital Eres <eres@il.ibm.com>

View File

@ -0,0 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-ffast-math" } */
double foo(void)
{
return __builtin_pow (0.0, -1.5);
}