return negate_expr_p (TREE_REALPART (t))
&& negate_expr_p (TREE_IMAGPART (t));
+ case COMPLEX_EXPR:
+ return negate_expr_p (TREE_OPERAND (t, 0))
+ && negate_expr_p (TREE_OPERAND (t, 1));
+
case PLUS_EXPR:
if (HONOR_SIGN_DEPENDENT_ROUNDING (TYPE_MODE (type))
|| HONOR_SIGNED_ZEROS (TYPE_MODE (type)))
}
break;
+ case COMPLEX_EXPR:
+ if (negate_expr_p (t))
+ return fold_build2 (COMPLEX_EXPR, type,
+ fold_negate_expr (TREE_OPERAND (t, 0)),
+ fold_negate_expr (TREE_OPERAND (t, 1)));
+ break;
+
case NEGATE_EXPR:
return TREE_OPERAND (t, 0);
if (fmax (x,fmin(y,x)) != x)
link_error ();
+
+ if ((__complex__ double) x != -(__complex__ double) (-x))
+ link_error ();
+
+ if (x*1i != -(-x*1i))
+ link_error ();
+
+ if (x+(x-y)*1i != -(-x+(y-x)*1i))
+ link_error ();
+
+ if (x+(x-y)*1i != -(-x-(x-y)*1i))
+ link_error ();
+
+ if (ccos(tan(x)+sin(y)*1i) != ccos(-tan(-x)+-sin(-y)*1i))
+ link_error ();
+
+ if (ccos(tan(x)+sin(x-y)*1i) != ccos(-tan(-x)-sin(y-x)*1i))
+ link_error ();
}
void test3(__complex__ double x, __complex__ double y, int i)
if (fmaxf (x,fminf(y,x)) != x)
link_error ();
+
+ if ((__complex__ float) x != -(__complex__ float) (-x))
+ link_error ();
+
+ if (x+(x-y)*1i != -(-x+(y-x)*1i))
+ link_error ();
+
+ if (x+(x-y)*1i != -(-x-(x-y)*1i))
+ link_error ();
+
+ if (ccosf(tanf(x)+sinf(y)*1i) != ccosf(-tanf(-x)+-sinf(-y)*1i))
+ link_error ();
+
+ if (ccosf(tanf(x)+sinf(x-y)*1i) != ccosf(-tanf(-x)-sinf(y-x)*1i))
+ link_error ();
}
void test3f(__complex__ float x, __complex__ float y, int i)
if (fmaxl (x,fminl(y,x)) != x)
link_error ();
+
+ if ((__complex__ long double) x != -(__complex__ long double) (-x))
+ link_error ();
+
+ if (x+(x-y)*1i != -(-x+(y-x)*1i))
+ link_error ();
+
+ if (x+(x-y)*1i != -(-x-(x-y)*1i))
+ link_error ();
+
+ if (ccosl(tanl(x)+sinl(y)*1i) != ccosl(-tanl(-x)+-sinl(-y)*1i))
+ link_error ();
+
+ if (ccosl(tanl(x)+sinl(x-y)*1i) != ccosl(-tanl(-x)-sinl(y-x)*1i))
+ link_error ();
}
void test3l(__complex__ long double x, __complex__ long double y, int i)