[flang-commits] [flang] [flang][openmp] Support importing module declare target globals (PR #213930)
Spencer Bryngelson via flang-commits
flang-commits at lists.llvm.org
Fri Aug 7 06:13:20 PDT 2026
sbryngelson wrote:
I hit this same bug independently and opened #214596 before seeing this; closed it as a duplicate. `IsFromModFile()` is the better discriminator, so nothing to salvage there.
One suggestion on the test. `flang/test/Lower/OpenMP/declare_target_module.mod` is a checked-in module file, and those carry a format version and checksum in their header (`!mod$ v1 sum:...`), so it can go stale when the module format changes and the failure mode is confusing.
`flang/test/Lower/OpenMP/groupprivate-modfile.f90` covers the sibling `groupprivate` path without a checked-in `.mod`, by generating it in a first RUN line:
```
! RUN: rm -rf %t && split-file %s %t
! RUN: %flang_fc1 -emit-hlfir -fopenmp -module-dir %t %t/m.f90 -o - > /dev/null
! RUN: %flang_fc1 -emit-hlfir -fopenmp -J %t %t/use.f90 -o - | FileCheck %s
```
Same coverage, nothing binary in tree. Feel free to ignore if the checked-in file is deliberate.
https://github.com/llvm/llvm-project/pull/213930
More information about the flang-commits
mailing list