4 Commits

Author SHA1 Message Date
Tom Eccles
3717048496
[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
2024-10-02 10:21:14 +01:00
Peter Klausler
7b80123387
[flang] More support for assumed-size Cray pointees (#77381)
Recognize Cray pointees as such when they are declared as assumed size
arrays, and don't emit a bogus error message about implied shape arrays.

Fixes https://github.com/llvm/llvm-project/issues/77330.
2024-01-15 12:08:00 -08:00
Tim Keith
1f8790050b [flang] Reformat with latest clang-format and .clang-format
Original-commit: flang-compiler/f18@9fe84f45d7
Reviewed-on: https://github.com/flang-compiler/f18/pull/1094
2020-03-28 21:00:16 -07:00
Varun Jayathirtha
92c1f6bb98 [flang] Add semantic checks C8104, C8105. Add tests for C8103, C8104, C8105
Original-commit: flang-compiler/f18@8134fc477e
Reviewed-on: https://github.com/flang-compiler/f18/pull/1037
2020-02-27 15:55:46 -08:00