public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/97782] New: [Fortran] Confused location information for OpenACC compute constructs
@ 2020-11-10 13:23 tschwinge at gcc dot gnu.org
  2020-11-10 14:14 ` [Bug fortran/97782] " burnus at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2020-11-10 13:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97782

            Bug ID: 97782
           Summary: [Fortran] Confused location information for OpenACC
                    compute constructs
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: openacc
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: burnus at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
  Target Milestone: ---

Created attachment 49539
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49539&action=edit
testcase

Tobias, please see the '-fdump-tree-original-lineno' dump of the testcase I'm
attaching.  Instead of expected line 9, the '#pragma acc kernels' has location
information for line 18, which happens to be the second '#pragma acc loop'. 
The same happens for other OpenACC compute constructs.  I have not checked
OpenMP.

Amongst other things, this confuses the '-fopt-info-omp-all' checking (that
one's specific to OpenACC 'kernels').

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/97782] [Fortran] Confused location information for OpenACC compute constructs
  2020-11-10 13:23 [Bug fortran/97782] New: [Fortran] Confused location information for OpenACC compute constructs tschwinge at gcc dot gnu.org
@ 2020-11-10 14:14 ` burnus at gcc dot gnu.org
  2020-11-10 14:15 ` burnus at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2020-11-10 14:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97782

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Created attachment 49540
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49540&action=edit
Draft patch

There are probably more – like 'omp sections', 'omp parallel', if I glanced at
it correctly. (Search for 'input_location' after 'gfc_trans_omp_code'.)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/97782] [Fortran] Confused location information for OpenACC compute constructs
  2020-11-10 13:23 [Bug fortran/97782] New: [Fortran] Confused location information for OpenACC compute constructs tschwinge at gcc dot gnu.org
  2020-11-10 14:14 ` [Bug fortran/97782] " burnus at gcc dot gnu.org
@ 2020-11-10 14:15 ` burnus at gcc dot gnu.org
  2020-11-12 13:14 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2020-11-10 14:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97782

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Technically, the issue is (was): The input_location is used which is obtained
when finishing the the block (= '!$acc end kernels') - or rather whatever comes
before and bumps the line location.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/97782] [Fortran] Confused location information for OpenACC compute constructs
  2020-11-10 13:23 [Bug fortran/97782] New: [Fortran] Confused location information for OpenACC compute constructs tschwinge at gcc dot gnu.org
  2020-11-10 14:14 ` [Bug fortran/97782] " burnus at gcc dot gnu.org
  2020-11-10 14:15 ` burnus at gcc dot gnu.org
@ 2020-11-12 13:14 ` cvs-commit at gcc dot gnu.org
  2020-11-12 14:42 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-12 13:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97782

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <burnus@gcc.gnu.org>:

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

commit r11-4942-gb71ff8c15f5a7d6b1cc1524b4d27843f0d88dbda
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Thu Nov 12 14:13:45 2020 +0100

    Fortran: improve location data for OpenACC/OpenMP directives [PR97782]

    gcc/fortran/ChangeLog:

            PR fortran/97782
            * trans-openmp.c (gfc_trans_oacc_construct,
gfc_trans_omp_parallel_do,
            gfc_trans_omp_parallel_do_simd, gfc_trans_omp_parallel_sections,
            gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections
            gfc_trans_omp_single, gfc_trans_omp_task, gfc_trans_omp_teams
            gfc_trans_omp_target, gfc_trans_omp_target_data,
            gfc_trans_omp_workshare): Use code->loc instead of input_location
            when building the OMP_/OACC_ construct.

    gcc/testsuite/ChangeLog:

            PR fortran/97782
            * gfortran.dg/goacc/classify-kernels-unparallelized.f95: Move
dg-message
            one line up.
            * gfortran.dg/goacc/classify-kernels.f95: Likewise.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/97782] [Fortran] Confused location information for OpenACC compute constructs
  2020-11-10 13:23 [Bug fortran/97782] New: [Fortran] Confused location information for OpenACC compute constructs tschwinge at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-11-12 13:14 ` cvs-commit at gcc dot gnu.org
@ 2020-11-12 14:42 ` cvs-commit at gcc dot gnu.org
  2020-11-12 15:44 ` burnus at gcc dot gnu.org
  2020-11-12 19:21 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-12 14:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97782

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Tobias Burnus
<burnus@gcc.gnu.org>:

https://gcc.gnu.org/g:5eebaff9f992814a2f8f915e436716b1b2c983df

commit r10-9018-g5eebaff9f992814a2f8f915e436716b1b2c983df
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Thu Nov 12 14:16:53 2020 +0100

    Fortran: improve location data for OpenACC/OpenMP directives [PR97782]

    gcc/fortran/ChangeLog:

            PR fortran/97782
            * trans-openmp.c (gfc_trans_oacc_construct,
gfc_trans_omp_parallel_do,
            gfc_trans_omp_parallel_do_simd, gfc_trans_omp_parallel_sections,
            gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections
            gfc_trans_omp_single, gfc_trans_omp_task, gfc_trans_omp_teams
            gfc_trans_omp_target, gfc_trans_omp_target_data,
            gfc_trans_omp_workshare): Use code->loc instead of input_location
            when building the OMP_/OACC_ construct.

    gcc/testsuite/ChangeLog:

            PR fortran/97782
            * gfortran.dg/goacc/classify-kernels-unparallelized.f95: Move
dg-message
            one line up.
            * gfortran.dg/goacc/classify-kernels.f95: Likewise.

    Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>

    (cherry picked from commit b71ff8c15f5a7d6b1cc1524b4d27843f0d88dbda)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/97782] [Fortran] Confused location information for OpenACC compute constructs
  2020-11-10 13:23 [Bug fortran/97782] New: [Fortran] Confused location information for OpenACC compute constructs tschwinge at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-11-12 14:42 ` cvs-commit at gcc dot gnu.org
@ 2020-11-12 15:44 ` burnus at gcc dot gnu.org
  2020-11-12 19:21 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2020-11-12 15:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97782

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> ---
FIXED for mainline (GCC 11) and GCC 10.

If the testcase is not covered by your upcoming patch merges, feel free to
commit it yourself (or tell me to commit it for you).

Thanks for the report!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/97782] [Fortran] Confused location information for OpenACC compute constructs
  2020-11-10 13:23 [Bug fortran/97782] New: [Fortran] Confused location information for OpenACC compute constructs tschwinge at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-11-12 15:44 ` burnus at gcc dot gnu.org
@ 2020-11-12 19:21 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-12 19:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97782

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Thomas Schwinge <tschwinge@gcc.gnu.org>:

https://gcc.gnu.org/g:9106c51e57c06e88a0dddf994fb5432b4bbe68c0

commit r11-4951-g9106c51e57c06e88a0dddf994fb5432b4bbe68c0
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Thu Nov 12 20:07:25 2020 +0100

    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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-12 19:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 13:23 [Bug fortran/97782] New: [Fortran] Confused location information for OpenACC compute constructs tschwinge at gcc dot gnu.org
2020-11-10 14:14 ` [Bug fortran/97782] " burnus at gcc dot gnu.org
2020-11-10 14:15 ` burnus at gcc dot gnu.org
2020-11-12 13:14 ` cvs-commit at gcc dot gnu.org
2020-11-12 14:42 ` cvs-commit at gcc dot gnu.org
2020-11-12 15:44 ` burnus at gcc dot gnu.org
2020-11-12 19:21 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).