[flang-commits] [flang] [flang][OpenMP] Do not emit an error for CRITICAL inside DEFAULT(NONE) (PR #216403)

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Fri Aug 21 10:18:19 PDT 2026


luporl wrote:

@tblah Thanks for the review.

Before landing this PR I ran the Fujitsu test suite and it found several regressions. These were limitations in DEFAULT(NONE) logic, exposed by this patch. Most of them were fixed in the last commit, but 2 still remain, related to implied-DO variables not being treated as private, as most compilers do. Example:
```f90
  !$omp parallel default(none)
    write(6,*) (i,i=1,10)     ! Referencing `i` should not cause an error.
  !$omp end parallel
```
This needs a more elaborate fix.

Besides that, DEFAULT(NONE) handling doesn't seem to be 100% spec compliant yet, mainly because variables are allowed to have their DSAs set implicitly in some cases, by non-leaf directives. But this can be addressed in the future, as it doesn't cause regressions and probably needs some discussion.


https://github.com/llvm/llvm-project/pull/216403


More information about the flang-commits mailing list