diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-07 12:36:40 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-07 12:36:40 +0000 |
commit | d4af184abef211f6264edece48e86cb2c9a4257a (patch) | |
tree | 9e45039f7fcbc38277ff97fbcc1203f1e66e05c7 /gcc/testsuite/gcc.c-torture/compile/pr46832.c | |
parent | d78118a326f1b98e028718a25950680264fb9cdd (diff) | |
download | gcc-d4af184abef211f6264edece48e86cb2c9a4257a.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167535 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr46832.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr46832.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr46832.c b/gcc/testsuite/gcc.c-torture/compile/pr46832.c new file mode 100644 index 00000000000..f500aa51068 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr46832.c @@ -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); +} |