re PR tree-optimization/46832 (internal compiler error: Segmentation fault)

2010-12-07  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/46832
	* tree-ssa-math-opts.c (execute_optimize_widening_mul): Check
	that the call has a lhs.

	* gcc.c-torture/compile/pr46832.c: New testcase.

From-SVN: r167535
This commit is contained in:
Richard Guenther 2010-12-07 12:36:40 +00:00 committed by Richard Biener
parent 5f286f4a1a
commit 85a47bed93
4 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2010-12-07 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46832
* tree-ssa-math-opts.c (execute_optimize_widening_mul): Check
that the call has a lhs.
2010-12-07 Yao Qi <yao@codesourcery.com>
* Makefile.in: Add $(TARGET_H) to the regrename.o rule.

View File

@ -1,3 +1,8 @@
2010-12-07 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46832
* gcc.c-torture/compile/pr46832.c: New testcase.
2010-12-07 Jakub Jelinek <jakub@redhat.com>
PR debug/46799

View File

@ -0,0 +1,4 @@
double pow(double x, double y);
void foo( double x ) {
int j = (int) ((pow(x, 2)) < 0.0 ? (pow(x, 2))-0.5 : (pow(x, 2))+0.5);
}

View File

@ -1707,7 +1707,8 @@ execute_optimize_widening_mul (void)
default:;
}
}
else if (is_gimple_call (stmt))
else if (is_gimple_call (stmt)
&& gimple_call_lhs (stmt))
{
tree fndecl = gimple_call_fndecl (stmt);
if (fndecl