https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100555

--- Comment #1 from xiao....@compiler-dev.com <xiao....@compiler-dev.com> ---
Additionally, "implicit none" will lead errors if exists
directive-name-modifier in if-clause.

module m
  integer, save :: n = 4
end module

program test
  use m
  use omp_lib
  implicit none
  integer :: i
!$omp target parallel do if(target: n > 2) if(parallel: n > 2)
  do i=1,n
    print *, "thread id = ", omp_get_thread_num()
  end do
!$omp end target parallel do
end program

The error is,

test.f90:10:54:

   10 | !$omp target parallel do if(target: n > 2) if(parallel: n > 2)
      |                                                      1
Error: Symbol ‘parallel’ at (1) has no IMPLICIT type; did you mean
‘omp_in_parallel’?

test.f90:10:34:

   10 | !$omp target parallel do if(target: n > 2) if(parallel: n > 2)
      |                                  1
Error: Symbol ‘target’ at (1) has no IMPLICIT type

Reply via email to