diff options
Diffstat (limited to 'test/Sema/complex-int.c')
-rw-r--r-- | test/Sema/complex-int.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Sema/complex-int.c b/test/Sema/complex-int.c index cb76a342c2d0..32249b35e1c5 100644 --- a/test/Sema/complex-int.c +++ b/test/Sema/complex-int.c @@ -53,3 +53,15 @@ void test4(_Complex float *x) { void test5(_Complex int *x) { (*x)++; } + +int i1[(2+3i)*(5+7i) == 29i-11 ? 1 : -1]; +int i2[(29i-11)/(5+7i) == 2+3i ? 1 : -1]; +int i3[-(2+3i) == +(-3i-2) ? 1 : -1]; +int i4[~(2+3i) == 2-3i ? 1 : -1]; +int i5[(3i == -(-3i) ? ((void)3, 1i - 1) : 0) == 1i - 1 ? 1 : -1]; + +int f1[(2.0+3.0i)*(5.0+7.0i) == 29.0i-11.0 ? 1 : -1]; +int f2[(29.0i-11.0)/(5.0+7.0i) == 2.0+3.0i ? 1 : -1]; +int f3[-(2.0+3.0i) == +(-3.0i-2.0) ? 1 : -1]; +int f4[~(2.0+3.0i) == 2.0-3.0i ? 1 : -1]; +int f5[(3.0i == -(-3.0i) ? ((void)3.0, __extension__ (1.0i - 1.0)) : 0) == 1.0i - 1.0 ? 1 : -1]; |