Issue 144181
Summary [Flang] fails to diagnose invalid write statement in forall construct
Labels flang:frontend
Assignees
Reporter k-arrows
    Reproducer:
https://godbolt.org/z/chnoPWx4e
```f90
integer :: i
forall (i = 1:1)
  print *, i
end forall
end
```

Gfortran and Ifx can diagnose the reproducer as follows:

Gfortran:
```console
/app/example.f90:3:12:

    3 |   print *, i
      |            1
Error: Unexpected WRITE statement in FORALL block at (1)
```

Ifx:
```console
/app/example.f90(3): error #7086: This statement in a FORALL construct is invalid.
  print *, i
--^
compilation aborted for /app/example.f90 (code 1)
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to