public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/100555] New: [OPENMP] ICE in target parallel construct with if-clause
@ 2021-05-12  3:50 xiao.liu@compiler-dev.com
  2021-05-12  7:59 ` [Bug fortran/100555] " xiao.liu@compiler-dev.com
  0 siblings, 1 reply; 2+ messages in thread
From: xiao.liu@compiler-dev.com @ 2021-05-12  3:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100555
           Summary: [OPENMP] ICE in target parallel construct with
                    if-clause
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xiao.liu@compiler-dev.com
  Target Milestone: ---

The test case is,

program test
  use omp_lib
  integer :: i
  i = 1
!!$omp target parallel if(target: i > 0) if(parallel: i > 0)  !ICE
!!$omp target parallel if(target: i > 0)
!!$omp target parallel if(parallel: i > 0) !ICE
!!$omp target parallel if(i > 0) !ICE
!$omp target parallel
  print *, "thread id = ", omp_get_thread_num()
!$omp end target parallel
end program

It seems that when exist if-clause applies to parallel directive, there is an
ICE.

If change target parallel construct to target parallel loop construct, there is
no ICE.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug fortran/100555] [OPENMP] ICE in target parallel construct with if-clause
  2021-05-12  3:50 [Bug fortran/100555] New: [OPENMP] ICE in target parallel construct with if-clause xiao.liu@compiler-dev.com
@ 2021-05-12  7:59 ` xiao.liu@compiler-dev.com
  0 siblings, 0 replies; 2+ messages in thread
From: xiao.liu@compiler-dev.com @ 2021-05-12  7:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from xiao.liu@compiler-dev.com <xiao.liu@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-12  7:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12  3:50 [Bug fortran/100555] New: [OPENMP] ICE in target parallel construct with if-clause xiao.liu@compiler-dev.com
2021-05-12  7:59 ` [Bug fortran/100555] " xiao.liu@compiler-dev.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).