[all-commits] [llvm/llvm-project] 371704: [flang][Semantics][OpenMP] don't reduce variables ...
Tom Eccles via All-commits
all-commits at lists.llvm.org
Wed Oct 2 02:21:36 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3717048496074929250e8d75c033e0b3409eb063
https://github.com/llvm/llvm-project/commit/3717048496074929250e8d75c033e0b3409eb063
Author: Tom Eccles <tom.eccles at arm.com>
Date: 2024-10-02 (Wed, 02 Oct 2024)
Changed paths:
M flang/lib/Semantics/check-namelist.cpp
M flang/lib/Semantics/check-namelist.h
M flang/lib/Semantics/resolve-directives.cpp
A flang/test/Semantics/OpenMP/reduction-namelist.f90
M flang/test/Semantics/resolve123.f90
Log Message:
-----------
[flang][Semantics][OpenMP] don't reduce variables in namelist (#110671)
This is allowed by the OpenMP and F23 standards. But variables in a
namelist are not allowed in OpenMP privatisation. I suspect this was an
oversight.
If we allow this we run into problems masking the original symbol with
the symbol for the reduction variable when the variable is accessed via
a namelist initialised as a global variable. See #101907. One solution
for this would be to force the namelist to always be initilized inside
of the block in which it is used (therefore using the correct mapping
for the reduction variable), but this could make some production
applications slow.
I tentatively think it is probably better to disallow a (perhaps
mistaken) edge case of the standards with (I think) little practical
use, than to make real applications slow in order to make this work. If
reviewers would rather keep to the letter of the standard, see #109303
which implements the alternative solution. I'm open to either path
forward.
Fixes #101907
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list