Closed
Description
Reproducer:
https://godbolt.org/z/chnoPWx4e
integer :: i
forall (i = 1:1)
print *, i
end forall
end
Gfortran and Ifx can diagnose the reproducer as follows:
Gfortran:
/app/example.f90:3:12:
3 | print *, i
| 1
Error: Unexpected WRITE statement in FORALL block at (1)
Ifx:
/app/example.f90(3): error #7086: This statement in a FORALL construct is invalid.
print *, i
--^
compilation aborted for /app/example.f90 (code 1)