aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2007-02-08 03:19:17 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2007-02-08 03:19:17 +0000
commit822f505b75eaa2a7a35481af4c8a76c8f87eba5e (patch)
treeca283fae51b7170ecdf5b39c982a8848514ffbba
parent896b1c879215b744a3e58f0c1362b2956d98029e (diff)
downloadgcc-822f505b75eaa2a7a35481af4c8a76c8f87eba5e.zip
gcc-822f505b75eaa2a7a35481af4c8a76c8f87eba5e.tar.gz
gcc-822f505b75eaa2a7a35481af4c8a76c8f87eba5e.tar.bz2
builtins-20.c: Add some -~ complex cases.
* gcc.dg/builtins-20.c: Add some -~ complex cases. From-SVN: r121710
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/builtins-20.c18
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index cf14bb0..ce9a320 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2007-02-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gcc.dg/builtins-20.c: Add some -~ complex cases.
+
2007-02-07 Hans-Peter Nilsson <hp@axis.com>
* lib/target-supports.exp (check_effective_target_simulator): New.
diff --git a/gcc/testsuite/gcc.dg/builtins-20.c b/gcc/testsuite/gcc.dg/builtins-20.c
index 7088075..9df23c4 100644
--- a/gcc/testsuite/gcc.dg/builtins-20.c
+++ b/gcc/testsuite/gcc.dg/builtins-20.c
@@ -215,6 +215,12 @@ void test2(double x, double y)
if (ccos(tan(x)+sin(x-y)*1i) != ccos(-tan(-x)-sin(y-x)*1i))
link_error ();
+
+ if (-5+x*1i != -~(5+x*1i))
+ link_error ();
+
+ if (tan(x)+tan(y)*1i != -~(tan(-x)+tan(y)*1i))
+ link_error ();
}
void test3(__complex__ double x, __complex__ double y, int i)
@@ -434,6 +440,12 @@ void test2f(float x, float y)
if (ccosf(tanf(x)+sinf(x-y)*1i) != ccosf(-tanf(-x)-sinf(y-x)*1i))
link_error ();
+
+ if (-5+x*1i != -~(5+x*1i))
+ link_error ();
+
+ if (tanf(x)+tanf(y)*1i != -~(tanf(-x)+tanf(y)*1i))
+ link_error ();
}
void test3f(__complex__ float x, __complex__ float y, int i)
@@ -653,6 +665,12 @@ void test2l(long double x, long double y)
if (ccosl(tanl(x)+sinl(x-y)*1i) != ccosl(-tanl(-x)-sinl(y-x)*1i))
link_error ();
+
+ if (-5+x*1i != -~(5+x*1i))
+ link_error ();
+
+ if (tanl(x)+tanl(y)*1i != -~(tanl(-x)+tanl(y)*1i))
+ link_error ();
}
void test3l(__complex__ long double x, __complex__ long double y, int i)