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) {
40334033template <class Emitter >
40344034bool Compiler<Emitter>::visitZeroInitializer(PrimType T, QualType QT,
40354035 const Expr *E) {
4036+ if (const auto *AT = QT->getAs <AtomicType>())
4037+ QT = AT->getValueType ();
4038+
40364039 switch (T) {
40374040 case PT_Bool:
40384041 return this ->emitZeroBool (E);
Original file line number Diff line number Diff line change @@ -175,7 +175,10 @@ namespace ZeroInit {
175175 static_assert (a.f == 0 .0f , " " );
176176
177177 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 , " " );
179182};
180183
181184namespace LongDouble {
You can’t perform that action at this time.
0 commit comments