-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
[Flang] Incorrect diagnostic on user defined operator of two different types using the same module procedure #124766
Comments
@llvm/issue-subscribers-flang-frontend Author: Daniel Chen (DanielCChen)
Consider the following code:
```
module m
type base type base1 contains integer function int_base1_base ( a, b ) end module
error: Semantic errors in t.f
|
It would open the door for ambiguity when the binding
|
I think if the dynamic type of |
But the binding |
Right, although it would resolve to the same procedure anyway. But I see your point. Let me try to clarify it because I don't see any wording in the standard disallow it. |
It is indeed invalid code as confirmed with the standard committee.
|
Consider the following code:
Flang currently issues an error as:
The code seems conforming to me. There doesn't seem any ambiguity when the user defined (+) is executed.
Both ifort and XLF compiled it successfully.
The text was updated successfully, but these errors were encountered: