public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Tobias Burnus <tobias@codesourcery.com>
Cc: Thomas Schwinge <thomas@codesourcery.com>,
	Jakub Jelinek <jakub@redhat.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>
Subject: Re: [Patch, Fortran] OpenMP/OpenACC – fix more issues with OPTIONAL
Date: Thu, 30 Apr 2020 08:24:02 +0200	[thread overview]
Message-ID: <CAFiYyc1Rd=yX-sFbSsa9aPRe6y7ZyFnuX-wqB=0TqX2hiFbScA@mail.gmail.com> (raw)
In-Reply-To: <85ca99af-f009-c843-59e0-54cef7906c18@codesourcery.com>

On Wed, Apr 29, 2020 at 5:05 PM Tobias Burnus <tobias@codesourcery.com> wrote:
>
> Hi Thomas,
>
> was a bit on the backburner but I now digged again.
> See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94848
>
> The problem is a generated static array variable in the
> device function:
>    static integer(kind=4) A.12[3] = {1, 2, 3};
> used as
>    _26 = A.12[S.13_67];
>
> With -ftree-pre, the expressions using _26 now directly use
> the value (1, 2 and 3). It seems as if the variable A.12 is
> eliminated before writing to LTO but the usage (A.12[S.…])
> is not – at least it still appears in the device dumps.
>
> Maybe it is also related to something else, but crucial is
> the -ftree-pre on the host side; the optimization level on
> the device lto1 side is irrelevant.

IIRC there was a bugreport similar to this where offload
variables were computed "early" instead of at the point
of streaming.

It's obvious that the offload "part" use is not reflected in
the non-offloat "part" IL (like via a function call parameter
or so), so I assume this is a local static in a function
we simply compile twice (but did not actually clone),
once for each offloat target and once for the host.  So it's
likely the above issue.

Richard.

> Cheers,
>
> Tobias
>
> On 4/29/20 12:00 PM, Thomas Schwinge wrote:
>
> > Hi Tobias!
> >
> > Do you happen to have any update regarding this one:
> >
> > On 2020-01-08T09:55:06+0100, Tobias Burnus <tobias@codesourcery.com> wrote:
> >> On 1/8/20 9:33 AM, Thomas Schwinge wrote:
> >>> With 'dg-do run' added, on [...] x86_64-pc-linux-gnu with offloading I'm seeing:
> > |     PASS: libgomp.fortran/use_device_ptr-optional-3.f90   -O0  (test for excess errors)
> > |     PASS: libgomp.fortran/use_device_ptr-optional-3.f90   -O0  execution test
> > |     PASS: libgomp.fortran/use_device_ptr-optional-3.f90   -O1  (test for excess errors)
> > |     PASS: libgomp.fortran/use_device_ptr-optional-3.f90   -O1  execution test
> > |     FAIL: libgomp.fortran/use_device_ptr-optional-3.f90   -O2  (test for excess errors)
> > |     UNRESOLVED: libgomp.fortran/use_device_ptr-optional-3.f90   -O2  compilation failed to produce executable
> > |     FAIL: libgomp.fortran/use_device_ptr-optional-3.f90   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  (test for excess errors)
> > |     UNRESOLVED: libgomp.fortran/use_device_ptr-optional-3.f90   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  compilation failed to produce executable
> > |     FAIL: libgomp.fortran/use_device_ptr-optional-3.f90   -O3 -g  (test for excess errors)
> > |     UNRESOLVED: libgomp.fortran/use_device_ptr-optional-3.f90   -O3 -g  compilation failed to produce executable
> > |     FAIL: libgomp.fortran/use_device_ptr-optional-3.f90   -Os  (test for excess errors)
> > |     UNRESOLVED: libgomp.fortran/use_device_ptr-optional-3.f90   -Os  compilation failed to produce executable
> >
> >>> ... due to:
> >>>       /tmp/cciVc43I.o:(.gnu.offload_vars+0x10): undefined reference to `A.12.4064'
> >>> which may be something like PR90779, PR85063, PR84592, PR90779,
> >>> PR80411, PR71536 -- or something else.
> >> Hmm. It is surely among the listed items, if all fails in the last item.
> >> Note that PR85063 is fixed and PR84592 a duplicate of PR90779 (which is
> >> listed twice). To through in another number it could also be a variant
> >> of PR 92029 to though in yet another number …
> >
> > 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
> -----------------
> Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
> Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter

  reply	other threads:[~2020-04-30  6:24 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <75222f0b-b55d-dcd9-b4f4-8e218675e8d7@mentor.com>
2019-07-12 11:35 ` [PATCH 0/5, OpenACC] Add support for Fortran optional arguments in OpenACC Kwok Cheung Yeung
2019-07-12 11:36   ` [PATCH 1/5, OpenACC] Allow NULL as an argument to OpenACC 2.6 directives Kwok Cheung Yeung
2019-11-29 14:42     ` [PR92726] OpenACC: 'NULL'-in -> no-op, and/or 'NULL'-out (was: [PATCH 1/5, OpenACC] Allow NULL as an argument to OpenACC 2.6 directives) Thomas Schwinge
2019-11-20 13:11       ` [Patch][OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments Tobias Burnus
2019-11-29 12:17         ` Tobias Burnus
2019-12-05 15:16         ` Jakub Jelinek
2019-12-05 15:47           ` [RFC] Characters per line: from punch card (80) to line printer (132) (was: [Patch][OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments) Thomas Schwinge
2019-12-05 16:04             ` Jakub Jelinek
2019-12-05 20:21               ` Segher Boessenkool
2019-12-05 16:17             ` Joseph Myers
2019-12-05 16:24               ` Paul Koning
2019-12-05 16:40                 ` Jeff Law
2019-12-05 16:55                 ` [RFC] Characters per line: from punch card (80) to line printer (132) Florian Weimer
2019-12-05 17:55               ` Andrew Stubbs
2019-12-05 18:12                 ` Eric Gallager
2019-12-05 18:22                 ` Robin Curtis
2019-12-05 19:16                   ` James Secan
2019-12-06  9:22                   ` Andrew Stubbs
2019-12-05 16:44             ` [RFC] Characters per line: from punch card (80) to line printer (132) (was: [Patch][OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments) Michael Matz
2019-12-05 17:03               ` Jonathan Wakely
2019-12-05 18:07                 ` Marek Polacek
2019-12-05 20:06                 ` Segher Boessenkool
2019-12-05 20:38                   ` Marek Polacek
2019-12-05 22:02                     ` Segher Boessenkool
2019-12-05 20:56                   ` Jonathan Wakely
2019-12-05 22:19                     ` Segher Boessenkool
2019-12-05 22:34                       ` Jonathan Wakely
2019-12-05 22:37                       ` Jonathan Wakely
2019-12-05 23:02                         ` Segher Boessenkool
2019-12-05 17:29               ` N.M. Maclaren
2019-12-05 20:12               ` Segher Boessenkool
2019-12-05 20:41               ` Jason Merrill
2019-12-05 18:54             ` [RFC] Characters per line: from punch card (80) to line printer (132) Martin Sebor
2019-12-05 20:32               ` Segher Boessenkool
2019-12-07 14:49         ` [Patch][OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments Thomas Schwinge
2019-12-11 10:52           ` Tobias Burnus
2019-12-10 17:54             ` [Patch, Fortran] OpenMP/OpenACC – fix more issues with OPTIONAL Tobias Burnus
2019-12-16  9:25               ` *ping* " Tobias Burnus
2019-12-29 23:46                 ` *ping**2 " Tobias Burnus
2019-12-30  4:33                   ` Jerry
2020-01-03 11:29               ` Jakub Jelinek
2020-01-08  8:33               ` Thomas Schwinge
2020-01-08  8:55                 ` Tobias Burnus
2020-04-29 10:00                   ` Thomas Schwinge
2020-04-29 14:01                     ` Tobias Burnus
2020-04-30  6:24                       ` Richard Biener [this message]
2020-04-30  7:17                         ` Jakub Jelinek
2020-05-05  9:08                           ` Tobias Burnus
2020-06-17 22:22                       ` Thomas Schwinge
2019-12-02 16:59       ` [PR92726] OpenACC: 'NULL'-in -> no-op, and/or 'NULL'-out Tobias Burnus
2019-07-12 11:37   ` [PATCH 2/5, OpenACC] Support Fortran optional arguments in the firstprivate clause Kwok Cheung Yeung
2019-07-12 11:42     ` Jakub Jelinek
2019-07-17 18:08       ` Kwok Cheung Yeung
2019-07-17 20:49         ` Tobias Burnus
2019-07-18  9:30           ` Tobias Burnus
2019-07-18 11:45             ` Kwok Cheung Yeung
2019-07-29 21:01       ` Kwok Cheung Yeung
2019-07-31 12:54         ` Jakub Jelinek
2019-10-07  9:26         ` Thomas Schwinge
2019-10-07 13:16           ` Kwok Cheung Yeung
2019-07-12 11:39   ` [PATCH 4/5, OpenACC] Allow optional arguments to be used in the use_device OpenACC clause Kwok Cheung Yeung
2019-07-29 22:42     ` Kwok Cheung Yeung
2019-07-31 13:13       ` Jakub Jelinek
2019-07-12 11:39   ` [PATCH 3/5, OpenACC] Add support for allocatable arrays as optional arguments Kwok Cheung Yeung
2019-07-12 11:41   ` [PATCH 5/5, OpenACC] Add tests for Fortran optional arguments in OpenACC 2.6 Kwok Cheung Yeung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFiYyc1Rd=yX-sFbSsa9aPRe6y7ZyFnuX-wqB=0TqX2hiFbScA@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=thomas@codesourcery.com \
    --cc=tobias@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).