[Bug fortran/91410] New: OpenMP error message when compiling OpenACC code
judicael.grasset at stfc dot ac.uk
gcc-bugzilla@gcc.gnu.org
Fri Aug 9 14:39:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91410
Bug ID: 91410
Summary: OpenMP error message when compiling OpenACC code
Product: gcc
Version: 9.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: judicael.grasset at stfc dot ac.uk
Target Milestone: ---
Hello,
When compiling the code below, the compiler generates error messages about
OpenMP syntax errors, but the code only uses OpenACC pragmas.
Also I think the code should compile and work fine.
I'm using GCC 9.1 with Power8 CPU
main.f:
program main
type t
integer, allocatable :: inside(:)
end type t
type(t) :: my_t
integer :: i
allocate(my_t%inside(100))
!$acc enter data copyin(my_t, my_t%inside)
!$acc parallel loop present(my_t, my_t%inside)
do i=1,100
my_t%inside(i) = i
end do
!$acc exit data copyout(my_t%inside, my_t)
write(*,*)my_t%inside
end program main
Compiling with:
gfortran main.f -Wall -Wextra -fopenacc
Error messages:
main.f:9:34:
9 | !$acc enter data copyin(my_t, my_t%inside)
| 1
Error: Syntax error in OpenMP variable list at (1)
main.f:10:38:
10 | !$acc parallel loop present(my_t, my_t%inside)
| 1
Error: Syntax error in OpenMP variable list at (1)
main.f:14:28:
14 | !$acc exit data copyout(my_t%inside, my_t)
| 1
Error: Syntax error in OpenMP variable list at (1)
$gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/gpfs/paragon/local/HCRI016/dre03/jxg58-dre03/softs/gcc-9.1/libexec/gcc/powerpc64le-unknown-linux-gnu/9.1.0/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
Target: powerpc64le-unknown-linux-gnu
Configured with:
/gpfs/paragon/local/HCRI016/dre03/jxg58-dre03/gcc-9.1.0/configure
--enable-offload-targets=nvptx-none
--with-cuda-driver-include=/gpfs/paragon/local/apps/cuda/9.2//include
--with-cuda-driver-lib=/gpfs/paragon/local/apps/cuda/9.2//lib64
--disable-bootstrap --disable-multilib --enable-languages=c,c++,fortran,lto
--with-cpu-64=power8 --with-tune-64=power8
--prefix=/gpfs/paragon/local/HCRI016/dre03/jxg58-dre03/softs/gcc-9.1
Thread model: posix
gcc version 9.1.0 (GCC)
More information about the Gcc-bugs
mailing list