@@ -1777,28 +1777,13 @@ void OmpAttributeVisitor::ResolveSeqLoopIndexInParallelOrTaskConstruct(
17771777// Use of DO CONCURRENT inside OpenMP construct is unspecified behavior
17781778// till OpenMP-5.0 standard.
17791779// In above both cases we skip the privatization of iteration variables.
1780- // [OpenMP 5.1] DO CONCURRENT indices are private
17811780bool OmpAttributeVisitor::Pre (const parser::DoConstruct &x) {
17821781 if (!dirContext_.empty () && GetContext ().withinConstruct ) {
17831782 llvm::SmallVector<const parser::Name *> ivs;
17841783 if (x.IsDoNormal ()) {
17851784 const parser::Name *iv{GetLoopIndex (x)};
17861785 if (iv && iv->symbol )
17871786 ivs.push_back (iv);
1788- } else if (x.IsDoConcurrent ()) {
1789- const Fortran::parser::LoopControl *loopControl = &*x.GetLoopControl ();
1790- const Fortran::parser::LoopControl::Concurrent &concurrent =
1791- std::get<Fortran::parser::LoopControl::Concurrent>(loopControl->u );
1792- const Fortran::parser::ConcurrentHeader &concurrentHeader =
1793- std::get<Fortran::parser::ConcurrentHeader>(concurrent.t );
1794- const std::list<Fortran::parser::ConcurrentControl> &controls =
1795- std::get<std::list<Fortran::parser::ConcurrentControl>>(
1796- concurrentHeader.t );
1797- for (const auto &control : controls) {
1798- const parser::Name *iv{&std::get<0 >(control.t )};
1799- if (iv && iv->symbol )
1800- ivs.push_back (iv);
1801- }
18021787 }
18031788 ordCollapseLevel--;
18041789 for (auto iv : ivs) {
@@ -1810,9 +1795,6 @@ bool OmpAttributeVisitor::Pre(const parser::DoConstruct &x) {
18101795 if (ordCollapseLevel) {
18111796 if (const auto *details{iv->symbol ->detailsIf <HostAssocDetails>()}) {
18121797 const Symbol *tpSymbol = &details->symbol ();
1813- // TODO: DoConcurrent won't capture the following check because a new
1814- // symbol is declared in ResolveIndexName(), which will not have the
1815- // OmpThreadprivate flag.
18161798 if (tpSymbol->test (Symbol::Flag::OmpThreadprivate)) {
18171799 context_.Say (iv->source ,
18181800 " Loop iteration variable %s is not allowed in THREADPRIVATE." _err_en_US,
0 commit comments