Hi! On 2020-11-12T12:45:24+0100, Tobias Burnus <tob...@codesourcery.com> wrote: > For code like > !$acc kernels > ... a lot of loops and other code > !$acc end kernels > > gfortran generates > #pragma ..._kernels > { > ... lot of code > } > > As the PR shows, the location associated with the #pragma > is not the 'acc kernels' line but the one near the 'acc end kernel' > line. > > The reason is that [...]
> This patch [...] > In principle, it should also have an effect on warnings (if there are > any) ..., and there are -- one, at least (and somewhat bogus, but still). ;-) I've thus pushed "Adjust 'libgomp.oacc-fortran/attach-descriptor-1.f90' for improved location information" to master branch in commit 9106c51e57c06e88a0dddf994fb5432b4bbe68c0, see attached. (Not (yet) relevant for releases/gcc-10 branch; the commit introducing that testcase isn't there yet -- that's to be discussed in a different thread.) Grüße Thomas ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter
>From 9106c51e57c06e88a0dddf994fb5432b4bbe68c0 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tho...@codesourcery.com> Date: Thu, 12 Nov 2020 20:07:25 +0100 Subject: [PATCH] Adjust 'libgomp.oacc-fortran/attach-descriptor-1.f90' for improved location information Fix-up for commit b71ff8c15f5a7d6b1cc1524b4d27843f0d88dbda "Fortran: improve location data for OpenACC/OpenMP directives [PR97782]". libgomp/ PR fortran/97782 * testsuite/libgomp.oacc-fortran/attach-descriptor-1.f90: Adjust. --- libgomp/testsuite/libgomp.oacc-fortran/attach-descriptor-1.f90 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libgomp/testsuite/libgomp.oacc-fortran/attach-descriptor-1.f90 b/libgomp/testsuite/libgomp.oacc-fortran/attach-descriptor-1.f90 index 960b9f94507..2701192e37d 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/attach-descriptor-1.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/attach-descriptor-1.f90 @@ -42,9 +42,8 @@ subroutine test(variant) stop 1 end if - ! FIXME: This warning is emitted on the wrong line number. - ! { dg-warning "using vector_length \\(32\\), ignoring 1" "" { target openacc_nvidia_accel_selected } 52 } !$acc serial present(myvar%arr2) + ! { dg-warning "using vector_length \\(32\\), ignoring 1" "" { target openacc_nvidia_accel_selected } .-1 } do i=1,10 myvar%arr1(i) = i + variant myvar%arr2(i) = i - variant -- 2.17.1