-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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] Using BOZ constant as the SOURCE=
argument of intrinsic TRANSFER
triggered a compile time error.
#125769
Comments
@llvm/issue-subscribers-flang-frontend Author: Daniel Chen (DanielCChen)
Consider the following code
```
real(4), parameter :: r4_ep = transfer (Z'34000000', 1.0_4)
end
error: Semantic errors in t.f
|
Use the |
The result type of |
My point relates to the source, not the mold. Without knowing the size of the source, the semantics of |
Right. XLF assumes the type of
Is it reasonable? |
How is |
We implemented the |
Gfortran rejects your code.
Note, a BOZ is defined in F2023 to be typeless. The requirement on SOURCE in 16.9.212 |
Right. It is not standard conforming. Flang and some other compilers added the extension to allow BOZ to be interchangeable with REAL or INTEGER type. The code in this issue is another case that I think could be added to the extension list. |
Consider the following code
This seems to be a reasonable extension to use BOZ constant.
Flang is currently disallowing it as
Both ifort and XLF compile the code successfully.
The text was updated successfully, but these errors were encountered: