| Issue |
240420
|
| Summary |
[flang] Compilation failure when named constant in an asynchronous data transfer
|
| Labels |
flang:frontend
|
| Assignees |
|
| Reporter |
DanielCChen
|
Consider the following code
```
program ex3811
implicit none
integer, parameter :: arr(3) = [1, 2, 3]
integer :: id, v(3)
open(10, status='scratch', form='unformatted', asynchronous='yes')
write(10, id=id, asynchronous='yes') arr
wait(10, id=id)
rewind(10)
read(10) v
print *, v
end program
```
Flang failed at the compilation as
```
error: Semantic errors in a1.f
a1.f:3:25: error: 'arr' may not have both the ASYNCHRONOUS and PARAMETER attributes
integer, parameter :: arr(3) = [1, 2, 3]
^^^
a1.f:3:25: error: An entity may not have the ASYNCHRONOUS attribute unless it is a variable
integer, parameter :: arr(3) = [1, 2, 3]
^^^
```
All gfortran, ifx and XLF compile and run successfully.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs