File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -4033,6 +4033,9 @@ template <class Emitter> bool Compiler<Emitter>::visitBool(const Expr *E) {
4033
4033
template <class Emitter >
4034
4034
bool Compiler<Emitter>::visitZeroInitializer(PrimType T, QualType QT,
4035
4035
const Expr *E) {
4036
+ if (const auto *AT = QT->getAs <AtomicType>())
4037
+ QT = AT->getValueType ();
4038
+
4036
4039
switch (T) {
4037
4040
case PT_Bool:
4038
4041
return this ->emitZeroBool (E);
Original file line number Diff line number Diff line change @@ -175,7 +175,10 @@ namespace ZeroInit {
175
175
static_assert (a.f == 0 .0f , " " );
176
176
177
177
constexpr A<double > b{12 };
178
- static_assert (a.f == 0.0 , " " );
178
+ static_assert (b.f == 0.0 , " " );
179
+
180
+ constexpr A<_Atomic(float )> c{12 };
181
+ static_assert (c.f == 0.0 , " " );
179
182
};
180
183
181
184
namespace LongDouble {
You can’t perform that action at this time.
0 commit comments