https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117765
--- Comment #7 from anlauf at gcc dot gnu.org ---
The patch catches functions but misses subroutine calls, as in:
! { dg-do compile }
!
program foo
implicit none
integer i
integer :: j = 0
real y(4)
do concurrent(i=1:4)
y(i) = bar(i) ! { dg-error "Reference to impure function" }
call bla(i) ! <<< caught
end do
do concurrent(i=1:4)
block
y(i) = bar(i) ! { dg-error "Reference to impure function" }
call bla(i) ! <<< MISSED!
end block
end do
contains
impure function bar(i)
real bar
integer, intent(in) :: i
j = j + i
bar = j
end function bar
impure subroutine bla (j)
integer, intent(in) :: j
print *, j
end subroutine bla
end program foo
If possible, can we fix that, too?
Thanks!