summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20020319-1.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-20 09:41:46 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-20 09:41:46 +0000
commitfe1b116757f7288676d2d3263e6b70624dc671ca (patch)
tree79ccb4c2d3eb0b8df336075f26872944075fde6f /gcc/testsuite/gcc.dg/20020319-1.c
parent5e32e203a35999927320817743ee51b93f171700 (diff)
downloadgcc-fe1b116757f7288676d2d3263e6b70624dc671ca.tar.gz
PR optimization/5999, middle-end/5731
* expr.c (expand_expr) [RDIV_EXPR]: Only convert real divisions into multiplications by reciprocals. * gcc.c-torture/compile/20020319-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51071 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/20020319-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/20020319-1.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20020319-1.c b/gcc/testsuite/gcc.dg/20020319-1.c
new file mode 100644
index 00000000000..46a756d775a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/20020319-1.c
@@ -0,0 +1,10 @@
+/* PR optimization/5999
+ This testcase ICEd because one a/b -> a * (1/b) optimization
+ did not handle complex divides. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ffast-math" } */
+
+__complex__ double foo (__complex__ double x, __complex__ double y)
+{
+ return x / y;
+}