[Flang][Semantics] Pure internal procedure incorrectly allows modification of host-associated dummy argument from parent procedure.
Open
flang
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
In the following case, the modification of _i_ inside the pure function should be rejected by flang, but currently passes semantic checks:
```
subroutine test_bad(i, x)
integer, pointer :: i
real :: x
x = func()
contains
real pure function func()
i = 0
func = 0.
end function
end subroutine
```
Flang compiler : https://godbolt.org/z/EqPax9fha
Gfortran: https://godbolt.org/z/dK4YE83E1
Contributor guide
Assessment
This issue has not been assessed yet.