Re: [Patch][v5] OpenMP: Move omp requires checks to libgomp

2023-09-15 Thread Thomas Schwinge
Hi! On 2022-07-01T15:06:05+0200, Tobias Burnus wrote: > OpenMP: Move omp requires checks to libgomp This became commit r13-1458-g683f11843974f0bdf42f79cdcbb0c2b43c7b81b0 "OpenMP: Move omp requires checks to libgomp". As of this, when I need to debug an offloading-compilation ICE, for example,

Re: [Patch][v5] OpenMP: Move omp requires checks to libgomp

2022-07-04 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 01, 2022 at 11:08:16PM +0200, Tobias Burnus wrote: >gomp_mutex_lock (®ister_lock); > > + if (omp_requires_mask && omp_requires_mask != omp_req) I'd use if (omp_req && omp_requires_mask && omp_requires_mask != omp_req) e.g. for the case of mixing GCC <= 12 compiled code with GCC

Re: [Patch][v5] OpenMP: Move omp requires checks to libgomp

2022-07-01 Thread Tobias Burnus
Updated version attached – I hope I got everything right, but I start to get tired, I am not 100% sure. On 01.07.22 18:55, Jakub Jelinek wrote: Perhaps you're just lucky and the stack contains '\0' there? Probably. Maybe it would be better to simply use different error message for the 0 vs. no

Re: [Patch][v5] OpenMP: Move omp requires checks to libgomp

2022-07-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 01, 2022 at 06:31:48PM +0200, Tobias Burnus wrote: > This is done in openmp.cc during parsing. The merging you quoted (in > parse.cc) happens > after the whole input file has been parsed and resolved. For your test case, > the > following error is shown: > > test.f90:1:15: > > 1

Re: [Patch][v5] OpenMP: Move omp requires checks to libgomp

2022-07-01 Thread Tobias Burnus
On 01.07.22 16:34, Jakub Jelinek wrote: On Fri, Jul 01, 2022 at 03:06:05PM +0200, Tobias Burnus wrote: [...] Will Fortran diagnose: subroutine foo !$omp requires unified_shared_memory !$omp target !$omp end target end subroutine foo subroutine bar !$omp requires reverse_offload !$omp target !$omp

Re: [Patch][v5] OpenMP: Move omp requires checks to libgomp

2022-07-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 01, 2022 at 03:06:05PM +0200, Tobias Burnus wrote: > --- a/gcc/fortran/parse.cc > +++ b/gcc/fortran/parse.cc > @@ -1168,7 +1168,8 @@ decode_omp_directive (void) > } >switch (ret) > { > -case ST_OMP_DECLARE_TARGET: > +/* Set omp_target_seen; exclude ST_OMP_DECLARE_T