[Bug fortran/98476] OpenMP offload syntax restriction

2021-01-19 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98476

--- Comment #7 from CVS Commits  ---
The master branch has been updated by Tobias Burnus :

https://gcc.gnu.org/g:c05cdfb3f6335d55226cef7917a783498aa41244

commit r11-6809-gc05cdfb3f6335d55226cef7917a783498aa41244
Author: Tobias Burnus 
Date:   Wed Jan 20 08:31:30 2021 +0100

OpenMP/Fortran: Fix gfortran.dg/gomp/is_device_ptr-2.f90

gcc/testsuite/ChangeLog:

PR fortran/98757
PR fortran/98476
* gfortran.dg/gomp/is_device_ptr-2.f90: Fix dg-error.

[Bug fortran/98476] OpenMP offload syntax restriction

2021-01-19 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98476

Tobias Burnus  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Tobias Burnus  ---
Close as FIXED.

Thanks for the report, especially for checking already upcoming GCC 11, which
helps to iron out issues before the release :-)

[Bug fortran/98476] OpenMP offload syntax restriction

2021-01-19 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98476

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Tobias Burnus :

https://gcc.gnu.org/g:049bfd186fae9fb764a3ec04acb20d3eaacda7a3

commit r11-6787-g049bfd186fae9fb764a3ec04acb20d3eaacda7a3
Author: Tobias Burnus 
Date:   Tue Jan 19 11:57:34 2021 +0100

OpenMP/Fortran: Fixes for {use,is}_device_ptr

gcc/fortran/ChangeLog:

PR fortran/98476
* openmp.c (resolve_omp_clauses): Change use_device_ptr
to use_device_addr for unless type(c_ptr); check all
list item for is_device_ptr.

gcc/ChangeLog:

PR fortran/98476
* omp-low.c (lower_omp_target): Handle nonpointer is_device_ptr.

libgomp/ChangeLog:

PR fortran/98476
* testsuite/libgomp.fortran/is_device_ptr-1.f90: New test.

gcc/testsuite/ChangeLog:

PR fortran/98476
* gfortran.dg/gomp/map-3.f90: Update expected scan-dump-tree.
* gfortran.dg/gomp/is_device_ptr-2.f90: New test.
* gfortran.dg/gomp/use_device_ptr-1.f90: New test.

[Bug fortran/98476] OpenMP offload syntax restriction

2021-01-19 Thread dominiq at lps dot ens.fr via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98476

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-01-19
 Ever confirmed|0   |1

[Bug fortran/98476] OpenMP offload syntax restriction

2021-01-19 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98476

Tobias Burnus  changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org

--- Comment #4 from Tobias Burnus  ---
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-January/563784.html

[Bug fortran/98476] OpenMP offload syntax restriction

2020-12-30 Thread xw111luoye at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98476

--- Comment #3 from Ye Luo  ---
I verified that current master has removed the syntax restriction. However, the
printout remains incorrect.

[Bug fortran/98476] OpenMP offload syntax restriction

2020-12-30 Thread xw111luoye at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98476

--- Comment #2 from Ye Luo  ---
@jakub thanks for the quick reply. However, even if I add map(to: a) which is
almost a no-op to satisfy the compiler for 4.5 spec. The printout result is
still wrong. It should be 0 and 1 but the fortran case prints 0 and 0.

[Bug fortran/98476] OpenMP offload syntax restriction

2020-12-29 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98476

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
The error is correct for OpenMP 4.5, !$omp target data there has the
restriction:
At least one map clause must appear on the directive.
and OpenMP 4.5 is what GCC 10 implements in Fortran mostly.
OpenMP 5.0 and 5.1 changes that restriction to:
At least one map, use_device_addr or use_device_ptr clause must appear on the
directive.
which is what you can see in the C and C++ FEs.
GCC 11 is going to implement the 5.0 behavior here even in Fortran.