|
@@ -3178,7 +3178,7 @@ findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj,
|
|
|
// Walk the designator's path to find the subobject.
|
|
|
for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {
|
|
|
// Reading an indeterminate value is undefined, but assigning over one is OK.
|
|
|
- if ((O->isAbsent() && handler.AccessKind != AK_Construct) ||
|
|
|
+ if ((O->isAbsent() && !(handler.AccessKind == AK_Construct && I == N)) ||
|
|
|
(O->isIndeterminate() && handler.AccessKind != AK_Construct &&
|
|
|
handler.AccessKind != AK_Assign &&
|
|
|
handler.AccessKind != AK_ReadObjectRepresentation)) {
|