]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
builtins-20.c: Add some -~ complex cases.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Thu, 8 Feb 2007 03:19:17 +0000 (03:19 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Thu, 8 Feb 2007 03:19:17 +0000 (03:19 +0000)
* gcc.dg/builtins-20.c: Add some -~ complex cases.

From-SVN: r121710

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtins-20.c

index cf14bb02a9fba976f045329b363c696603548e39..ce9a32015a11f1794e1601abb42b6cbe3bf5faaf 100644 (file)
@@ -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. 
index 7088075511c52718b8651b12cb4fb191f83db160..9df23c4eb600bf00ae222beff89956ffb6fd6d28 100644 (file)
@@ -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)