[all-commits] [llvm/llvm-project] 564e04: [flang][OpenMP] Use function symbol on DECLARE TAR...
Krzysztof Parzyszek via All-commits
all-commits at lists.llvm.org
Wed Apr 2 13:16:54 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 564e04b703dc5df062f862e32c00bf1a1716f96f
https://github.com/llvm/llvm-project/commit/564e04b703dc5df062f862e32c00bf1a1716f96f
Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: 2025-04-02 (Wed, 02 Apr 2025)
Changed paths:
M flang/lib/Semantics/resolve-directives.cpp
M flang/lib/Semantics/unparse-with-symbols.cpp
M flang/test/Lower/OpenMP/declare-target-func-and-subr.f90
A flang/test/Semantics/OpenMP/declare-target-function-name-with-symbols.f90
Log Message:
-----------
[flang][OpenMP] Use function symbol on DECLARE TARGET (#134107)
Consider:
```
function foo()
!$omp declare target(foo) ! This `foo` was a function-result symbol
...
end
```
When resolving symbols, for this case use the symbol corresponding to
the function instead of the symbol corresponding to the function result.
Currently, this will result in an error:
```
error: A variable that appears in a DECLARE TARGET directive must be
declared in the scope of a module or have the SAVE attribute, either
explicitly or implicitly
```
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