https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103914
Bug ID: 103914
Summary: -fcheck=do: Problems with omp parallel do construct
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
The test case do.f90:
program test
integer :: i
!$omp parallel do
do i = 1, 10
call foo(i)
end do
!$omp end parallel do
contains
subroutine foo(i)
integer :: i
i = i + 3
end subroutine
end program test
When compile it with "gfortran do.f90 -fcheck=do"
run a.out, error message is:
At line 4 of file do.f90
Fortran runtime error: Loop variable has been modified
When compile it with "gfortran do.f90 -fcheck=do -fopenmp"
run a.out, no runtime error occur.
I have some questions:
why the option "-fcheck=do" do not take effect for "parallel do"?
Should the option "-fcheck=do" take effect for "parallel do"?