-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[flang] Spurious error with ASSOCIATE in a PURE procedure #131356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-flang-frontend Author: None (kcooley-cvd)
When given the following code:
MODULE test_m
REAL :: module_var
CONTAINS
PURE SUBROUTINE test()
ASSOCIATE(var => module_var)
END ASSOCIATE
END SUBROUTINE test
END MODULE test_m Flang wrongly announces an error:
But
|
Thanks for the bug report and its short and clear example! Quick fix coming soon. |
klausler
added a commit
to klausler/llvm-project
that referenced
this issue
Mar 14, 2025
A PURE subprogram can't have a local variable with the SAVE attribute. An ASSOCIATE or SELECT TYPE construct entity whose selector is a variable will return true from IsSave(); exclude them from the local variable check. Fixes llvm#131356.
klausler
added a commit
that referenced
this issue
Mar 19, 2025
A PURE subprogram can't have a local variable with the SAVE attribute. An ASSOCIATE or SELECT TYPE construct entity whose selector is a variable will return true from IsSave(); exclude them from the local variable check. Fixes #131356.
llvm-sync bot
pushed a commit
to arm/arm-toolchain
that referenced
this issue
Mar 19, 2025
… (#131383) A PURE subprogram can't have a local variable with the SAVE attribute. An ASSOCIATE or SELECT TYPE construct entity whose selector is a variable will return true from IsSave(); exclude them from the local variable check. Fixes llvm/llvm-project#131356.
What is the approximate timeline for this fix to make it into a release? |
/cherry-pick b99dab2 |
/pull-request #137752 |
swift-ci
pushed a commit
to swiftlang/llvm-project
that referenced
this issue
May 9, 2025
A PURE subprogram can't have a local variable with the SAVE attribute. An ASSOCIATE or SELECT TYPE construct entity whose selector is a variable will return true from IsSave(); exclude them from the local variable check. Fixes llvm#131356. (cherry picked from commit b99dab2)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When given the following code:
Flang wrongly announces an error:
But
test
is a validPURE
subroutine sincevar
is not assigned to. Version information:The text was updated successfully, but these errors were encountered: