Merge 'c-c++-common/goacc/routine-6.c' into 'c-c++-common/goacc/routine-5.c', and document current C/C++ difference (was: [PATCH] openacc: Fix up C++ #pragma acc routine handling [PR101731])

2022-01-13 Thread Thomas Schwinge
Hi! On 2021-11-22T16:02:31+0100, Jakub Jelinek via Gcc-patches wrote: > On Mon, Nov 22, 2021 at 03:49:42PM +0100, Thomas Schwinge wrote: >> Then, regarding the user-visible behavior: >> >> > +#pragma acc routine /* { dg-error "not immediately followed by a single >> > function declaration or

Re: [PATCH] openacc: Fix up C++ #pragma acc routine handling [PR101731]

2021-11-22 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 22, 2021 at 03:49:42PM +0100, Thomas Schwinge wrote: > Then, regarding the user-visible behavior: > > > +#pragma acc routine /* { dg-error "not immediately followed by a single > > function declaration or definition" "" { target c++ } } */ > > +int foo (int bar ()); > > So in C++

Re: [PATCH] openacc: Fix up C++ #pragma acc routine handling [PR101731]

2021-11-22 Thread Thomas Schwinge
Hi Jakub! On 2021-11-20T09:39:53+0100, Jakub Jelinek via Gcc-patches wrote: > The following testcase ICEs because two function declarations are nested in > each other and the acc routine handling code isn't prepared to put the > pragma on both. Ha. Many things covered in

[PATCH] openacc: Fix up C++ #pragma acc routine handling [PR101731]

2021-11-20 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase ICEs because two function declarations are nested in each other and the acc routine handling code isn't prepared to put the pragma on both. The fix is similar to what #pragma omp declare {simd,variant} does, in particular set the fndecl_seen flag already in