Re: [Patch] OpenMP: Add 'omp requires' to Fortran (mostly parsing)

2020-07-29 Thread Tobias Burnus
Committed as r11-2395, https://gcc.gnu.org/g:269322ece17202632bc354e9c510e4a5bd6ad84b with review comments applied plus a follow-up commit for an indentation issue I missed: r11-2399, https://gcc.gnu.org/g:6de5600a8bd1ef0ad3d57670efdcc68bb3484276 Tobias On 7/29/20 10:23 AM, Jakub Jelinek wrote

Re: [Patch] OpenMP: Add 'omp requires' to Fortran (mostly parsing)

2020-07-29 Thread Jakub Jelinek via Gcc-patches
On Wed, Jul 29, 2020 at 10:10:35AM +0200, Tobias Burnus wrote: > + case AB_OMP_REQ_REVERSE_OFFLOAD: > +gfc_omp_requires_add_clause (OMP_REQ_REVERSE_OFFLOAD, > + "reverse_offload", > + &gfc_current_lo

Re: [Patch] OpenMP: Add 'omp requires' to Fortran (mostly parsing)

2020-07-29 Thread Tobias Burnus
And another update; I removed the global variable, which was only used for checking at the end – and reconstruct its value in a local variable just before calling gfc_check_omp_requires. (Following a suggestion by Jakub and removing a kind-of left over from the first implementation.) Tobias On

Re: [Patch] OpenMP: Add 'omp requires' to Fortran (mostly parsing)

2020-07-28 Thread Tobias Burnus
I just realized that supporting 'acq_rel' is simple; while 'omp atomic' parsing needs to be updated quite a bit for the OpenMP 5 changes, just adding ACQ_REL support for 'requires' is trivial. Hence, I updated the requires-9.c testcase for 'acq_rel', adjusted trans-openmp.c and did some openmp.c

Re: [Patch] OpenMP: Add 'omp requires' to Fortran (mostly parsing)

2020-07-28 Thread Tobias Burnus
Attached is an updated version – whether that will be fully in line with OpenMP 5.1 remains to be seen. But in any case, it now handles properly: "If a directive appears in the declarative part of a module then the behavior is as if that directive appears after any references to that module." Not

[Patch] OpenMP: Add 'omp requires' to Fortran (mostly parsing)

2020-07-24 Thread Tobias Burnus
As with C/C++, the offloading requires are not implemented an rejected early with a 'sorry'. The mem-setting default for atomic is handled, but only 'seq_cst' as currently gfortran's only supports this one. (C/C++ support more.) In C/C++, the 'requires' has to be at file scope. For Fortran, "mu