This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fixed restrictions checking for OpenACC loop-associated constructs.
ClosedPublic

Authored by vzakhari on Jan 26 2023, 10:16 AM.

Details

Summary

CheckDoConcurrentClauseRestriction and CheckTileClauseRestriction expect
that the construct has associated DoConstruct, while it is not set
when the do-loop has no loop control. The change is to skip the clauses
checks, when the do-loop does not have the loop control.

An alternative fix would be to associate the DoConstruct even when
the do-loop has no loop control and let Check*ClauseRestriction run their
checks, but I am not sure if associating invalid DoConstruct is a good idea.

This fixes failure in Semantics/OpenACC/acc-canonicalization-validity.f90
reported in D142279.

Diff Detail