This is an archive of the discontinued LLVM Phabricator instance.

[Flang][OpenMP] Fix when the toplevel unit is present in declare target
ClosedPublic

Authored by kiranchandramohan on Feb 17 2023, 6:38 AM.

Details

Summary

If the toplevel unit is present in a declare target construct, do not
try to again find the enclosing construct.
Patch also re-arranges the checks.

Diff Detail

Event Timeline

Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 17 2023, 6:38 AM
kiranchandramohan requested review of this revision.Feb 17 2023, 6:38 AM
peixin accepted this revision.Feb 20 2023, 5:53 PM

LGTM

flang/lib/Semantics/check-omp-structure.cpp
1033

Nit:

"The %s directive and the common block or variable "
"in it must appear in the same declaration section "
"of a scoping unit"_err_en_US,
This revision is now accepted and ready to land.Feb 20 2023, 5:53 PM