@@ -859,10 +859,14 @@ Init make(const parser::OmpClause::Init &inp,
859859InReduction make (const parser::OmpClause::InReduction &inp,
860860 semantics::SemanticsContext &semaCtx) {
861861 // inp.v -> parser::OmpInReductionClause
862- auto &t0 = std::get<parser::OmpReductionIdentifier>(inp.v .t );
862+ auto &mods = semantics::OmpGetModifiers (inp.v );
863+ auto *m0 =
864+ semantics::OmpGetUniqueModifier<parser::OmpReductionIdentifier>(mods);
863865 auto &t1 = std::get<parser::OmpObjectList>(inp.v .t );
866+ assert (m0 && " OmpReductionIdentifier is required" );
867+
864868 return InReduction{
865- {/* ReductionIdentifiers=*/ {makeReductionOperator (t0 , semaCtx)},
869+ {/* ReductionIdentifiers=*/ {makeReductionOperator (*m0 , semaCtx)},
866870 /* List=*/ makeObjects (t1, semaCtx)}};
867871}
868872
@@ -1155,17 +1159,17 @@ Reduction make(const parser::OmpClause::Reduction &inp,
11551159 );
11561160
11571161 auto &mods = semantics::OmpGetModifiers (inp.v );
1158- auto *t0 =
1162+ auto *m0 =
11591163 semantics::OmpGetUniqueModifier<parser::OmpReductionModifier>(mods);
1160- auto *t1 =
1164+ auto *m1 =
11611165 semantics::OmpGetUniqueModifier<parser::OmpReductionIdentifier>(mods);
1162- auto &t2 = std::get<parser::OmpObjectList>(inp.v .t );
1163- assert (t1 && " OmpReductionIdentifier is required" );
1166+ auto &t1 = std::get<parser::OmpObjectList>(inp.v .t );
1167+ assert (m1 && " OmpReductionIdentifier is required" );
11641168
11651169 return Reduction{
1166- {/* ReductionModifier=*/ maybeApplyToV (convert, t0 ),
1167- /* ReductionIdentifiers=*/ {makeReductionOperator (*t1 , semaCtx)},
1168- /* List=*/ makeObjects (t2 , semaCtx)}};
1170+ {/* ReductionModifier=*/ maybeApplyToV (convert, m0 ),
1171+ /* ReductionIdentifiers=*/ {makeReductionOperator (*m1 , semaCtx)},
1172+ /* List=*/ makeObjects (t1 , semaCtx)}};
11691173}
11701174
11711175// Relaxed: empty
@@ -1259,13 +1263,13 @@ TaskReduction make(const parser::OmpClause::TaskReduction &inp,
12591263 semantics::SemanticsContext &semaCtx) {
12601264 // inp.v -> parser::OmpReductionClause
12611265 auto &mods = semantics::OmpGetModifiers (inp.v );
1262- auto *t0 =
1266+ auto *m0 =
12631267 semantics::OmpGetUniqueModifier<parser::OmpReductionIdentifier>(mods);
12641268 auto &t1 = std::get<parser::OmpObjectList>(inp.v .t );
1265- assert (t0 && " OmpReductionIdentifier is required" );
1269+ assert (m0 && " OmpReductionIdentifier is required" );
12661270
12671271 return TaskReduction{
1268- {/* ReductionIdentifiers=*/ {makeReductionOperator (*t0 , semaCtx)},
1272+ {/* ReductionIdentifiers=*/ {makeReductionOperator (*m0 , semaCtx)},
12691273 /* List=*/ makeObjects (t1, semaCtx)}};
12701274}
12711275
0 commit comments