summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr21032.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-23 07:15:45 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-23 07:15:45 +0000
commit6d9936db60b54ad1f35ca2803b717818a9571e62 (patch)
tree7d9beeeaa99bee3c5a1fbb22e70da00ea720cc71 /gcc/testsuite/gcc.dg/pr21032.c
parentdc9682586abad956ec7beac2890a8b741d4b72b1 (diff)
downloadgcc-6d9936db60b54ad1f35ca2803b717818a9571e62.tar.gz
2006-10-23 Richard Guenther <rguenther@suse.de>
PR middle-end/21032 * convert.c (convert_to_real): Fold (float)-x to -(float)x only if not flag_rounding_math. * gcc.dg/pr21032.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117968 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr21032.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr21032.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr21032.c b/gcc/testsuite/gcc.dg/pr21032.c
new file mode 100644
index 00000000000..839a180cead
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr21032.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized -frounding-math" } */
+
+void bar(float x);
+void foo(double x)
+{
+ bar(-x);
+}
+
+/* { dg-final { scan-tree-dump-not "-\\(float\\)" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */