-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[Flang] Incorrect diagnose when declare a procedure with explicit typing in multiple statements #82006
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: Daniel Chen (DanielCChen)
Consider the following code.
```
integer :: proc
procedure() :: proc
end
```
Flang currently issues an error as
It seems incorrect. This code should be equivalent to |
@llvm/issue-subscribers-bug Author: Daniel Chen (DanielCChen)
Consider the following code.
```
integer :: proc
procedure() :: proc
end
```
Flang currently issues an error as
It seems incorrect. This code should be equivalent to |
Fortran allows a procedure declaration statement with no interface or type, with an explicit type declaration statement elsewhere being used to define a function's result. Fixes llvm#82006.
That case has multiple type declarations for the same symbol; gfortran and NAG also emit errors. |
Yeah, I saw gfortran issuing an error, but both XLF and ifort accept it. It seems a harmless thing to do as the procedure declaration statement declares |
Go right ahead and implement it if that's what you want. |
Thanks for confirming that. I will open a new issue to track that and let the merging of PR #82835 to close this one. |
Fortran allows a procedure declaration statement with no interface or type, with an explicit type declaration statement elsewhere being used to define a function's result. Fixes #82006.
Consider the following code.
Flang currently issues an error as
It seems incorrect. This code should be equivalent to
procedure(integer) :: proc
.The text was updated successfully, but these errors were encountered: