From 85a47bed9340d25f861b9e2a186a4d443660cc26 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Tue, 7 Dec 2010 12:36:40 +0000 Subject: re PR tree-optimization/46832 (internal compiler error: Segmentation fault) 2010-12-07 Richard Guenther 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 --- gcc/tree-ssa-math-opts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/tree-ssa-math-opts.c') diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c index e8f9037..ed9b7a9 100644 --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -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 -- cgit v1.1