33// Test the constant folding of builtin complex numbers.
44
55static_assert ((0.0 + 0 .0j) == (0.0 + 0 .0j));
6- static_assert ((0.0 + 0 .0j) != (0.0 + 0 .0j)); // expected-error {{static assertion}}
6+ static_assert ((0.0 + 0 .0j) != (0.0 + 0 .0j)); // expected-error {{static assertion}} \
7+ // expected-note {{evaluates to}}
78
89static_assert ((0.0 + 0 .0j) == 0.0 );
910static_assert (0.0 == (0.0 + 0 .0j));
@@ -14,21 +15,29 @@ static_assert(0.0 != 1.0j);
1415
1516// Walk around the complex plane stepping between angular differences and
1617// equality.
17- static_assert ((1.0 + 0 .0j) == (0.0 + 0 .0j)); // expected-error {{static assertion}}
18+ static_assert ((1.0 + 0 .0j) == (0.0 + 0 .0j)); // expected-error {{static assertion}} \
19+ // expected-note {{evaluates to}}
1820static_assert ((1.0 + 0 .0j) == (1.0 + 0 .0j));
19- static_assert ((1.0 + 1 .0j) == (1.0 + 0 .0j)); // expected-error {{static assertion}}
21+ static_assert ((1.0 + 1 .0j) == (1.0 + 0 .0j)); // expected-error {{static assertion}} \
22+ // expected-note {{evaluates to}}
2023static_assert ((1.0 + 1 .0j) == (1.0 + 1 .0j));
21- static_assert ((0.0 + 1 .0j) == (1.0 + 1 .0j)); // expected-error {{static assertion}}
24+ static_assert ((0.0 + 1 .0j) == (1.0 + 1 .0j)); // expected-error {{static assertion}} \
25+ // expected-note {{evaluates to}}
2226static_assert ((0.0 + 1 .0j) == (0.0 + 1 .0j));
23- static_assert ((-1.0 + 1 .0j) == (0.0 + 1 .0j)); // expected-error {{static assertion}}
27+ static_assert ((-1.0 + 1 .0j) == (0.0 + 1 .0j)); // expected-error {{static assertion}} \
28+ // expected-note {{evaluates to}}
2429static_assert ((-1.0 + 1 .0j) == (-1.0 + 1 .0j));
25- static_assert ((-1.0 + 0 .0j) == (-1.0 + 1 .0j)); // expected-error {{static assertion}}
30+ static_assert ((-1.0 + 0 .0j) == (-1.0 + 1 .0j)); // expected-error {{static assertion}} \
31+ // expected-note {{evaluates to}}
2632static_assert ((-1.0 + 0 .0j) == (-1.0 + 0 .0j));
27- static_assert ((-1.0 - 1 .0j) == (-1.0 + 0 .0j)); // expected-error {{static assertion}}
33+ static_assert ((-1.0 - 1 .0j) == (-1.0 + 0 .0j)); // expected-error {{static assertion}} \
34+ // expected-note {{evaluates to}}
2835static_assert ((-1.0 - 1 .0j) == (-1.0 - 1 .0j));
29- static_assert ((0.0 - 1 .0j) == (-1.0 - 1 .0j)); // expected-error {{static assertion}}
36+ static_assert ((0.0 - 1 .0j) == (-1.0 - 1 .0j)); // expected-error {{static assertion}} \
37+ // expected-note {{evaluates to}}
3038static_assert ((0.0 - 1 .0j) == (0.0 - 1 .0j));
31- static_assert ((1.0 - 1 .0j) == (0.0 - 1 .0j)); // expected-error {{static assertion}}
39+ static_assert ((1.0 - 1 .0j) == (0.0 - 1 .0j)); // expected-error {{static assertion}} \
40+ // expected-note {{evaluates to}}
3241static_assert ((1.0 - 1 .0j) == (1.0 - 1 .0j));
3342
3443// Test basic mathematical folding of both complex and real operands.
0 commit comments