1 // RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=expected,both -Wno-unused-value %s
2 // RUN: %clang_cc1 -verify=ref,both -Wno-unused-value %s
5 __complex__
unsigned xx
;
7 __complex__
int result
;
9 /// The following line calls into the constant interpreter.
14 _Static_assert((0.0 + 0.0j
) == (0.0 + 0.0j
), "");
15 _Static_assert((0.0 + 0.0j
) != (0.0 + 0.0j
), ""); // both-error {{static assertion}} \
16 // both-note {{evaluates to}}
18 const _Complex
float FC
= {0.0f
, 0.0f
};
19 _Static_assert(!FC
, "");
20 const _Complex
float FI
= {0, 0};
21 _Static_assert(!FI
, "");
24 /// Make sure we're stripping the _Atomic part from the
26 void testComplexFloat(_Atomic(_Complex
float) *fp
) {
27 _Atomic(_Complex
float) x
= 2.0f
;
28 _Complex
float f
= *fp
;