public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Lewis Hyatt <lhyatt@gmail.com>
To: Tobias Burnus <tobias@codesourcery.com>
Cc: Thomas Schwinge <thomas@codesourcery.com>,
	gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: XFAIL 'offloading_enabled' diagnostics issue in 'libgomp.oacc-c-c++-common/reduction-5.c' [PR101551] (was: Enhance '_Pragma' diagnostics verification in OMP C/C++ test cases)
Date: Wed, 13 Jul 2022 18:30:30 -0400	[thread overview]
Message-ID: <CAA_5UQ6uM-B-mx_NfHUguAzL0UrAubB-yqP8YyzLUE07LssV-A@mail.gmail.com> (raw)
In-Reply-To: <ba633b71-14e1-0eb3-5969-702f8935c57d@codesourcery.com>

On Tue, Jul 12, 2022 at 9:10 AM Tobias Burnus <tobias@codesourcery.com> wrote:
> On 12.07.22 13:50, Lewis Hyatt via Gcc-patches wrote:
> > On Tue, Jul 12, 2022 at 2:33 AM Thomas Schwinge <thomas@codesourcery.com> wrote:
> >> On 2022-07-11T11:27:12+0200, I wrote:
> >>> Oh my, PR101551 "[offloading] Differences in diagnostics etc."
> >>> strikes again...  The latter two 'note' diagnostics are currently
> >>> only emitted in non-offloading configurations.  I've now pushed to
> >>> master branch commit 3723aedaad20a129741c2f6f3c22b3dd1220a3fc
> >>> "XFAIL 'offloading_enabled' diagnostics issue in
> >>> 'libgomp.oacc-c-c++-common/reduction-5.c' [PR101551]", see attached.
> > Would you mind please confirming how I need to run configure in order
> > to get this configuration? Then I can look into why the difference in
> > location information there. Thanks.
>
> I think the simplest to replicate it without much effort is to run:
>
> cd ${GCC-SRC}/gcc
> sed -e 's/ENABLE_OFFLOADING/true/' *.cc */*.cc
>
> I think that covers all cases, which do not need the target lto1.
> If they do do - then it becomes more difficult as you need an
> offloading compiler. (But that is rather about: diagnostic or
> no diagostic and not about having a different diagnostic.)
>
> I think the different diagnostic has the reason stated in
> commit r12-135-gbd7ebe9da745a62184052dd1b15f4dd10fbdc9f4
>
> Namely:
> ----cut---
>      It turned out that a compiler built without offloading support
>      and one with can produce slightly different diagnostic.
>
>      Offloading support implies ENABLE_OFFLOAD which implies that
>      g->have_offload is set when offloading is actually needed.
>      In cgraphunit.c, the latter causes flag_generate_offload = 1,
>      which in turn affects tree.c's free_lang_data.
>
>      The result is that the front-end specific diagnostic gets reset
>      ('tree_diagnostics_defaults (global_dc)'), which affects in this
>      case 'Warning' vs. 'warning' via the Fortran frontend.
>
>      Result: 'Warning:' vs. 'warning:'.
>      Side note: Other FE also override the diagnostic, leading to
>      similar differences, e.g. the C++ FE outputs mangled function
>      names differently
> ----cut------
>
> If the message is from the offload-device's lto1 compiler, it
> becomes more difficult to configure+build GCC. See
> https://gcc.gnu.org/wiki/Offloading under
> "How to build an offloading-enabled GCC"
>
> I hope it helps.

Yes, very much, thank you. I am trying something that should improve
it, and also a similar issue that happens with -flto, I made this PR
about the latter: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106274

  reply	other threads:[~2022-07-13 22:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-09 20:52 [PATCH] c: Fix location for _Pragma tokens [PR97498] Lewis Hyatt
2022-07-10  3:58 ` Jeff Law
2022-07-10 20:51   ` Lewis Hyatt
2022-07-11  9:27     ` Enhance '_Pragma' diagnostics verification in OMP C/C++ test cases (was: [PATCH] c: Fix location for _Pragma tokens [PR97498]) Thomas Schwinge
2022-07-12  6:33       ` XFAIL 'offloading_enabled' diagnostics issue in 'libgomp.oacc-c-c++-common/reduction-5.c' [PR101551] (was: Enhance '_Pragma' diagnostics verification in OMP C/C++ test cases) Thomas Schwinge
2022-07-12 11:50         ` Lewis Hyatt
2022-07-12 13:10           ` Tobias Burnus
2022-07-13 22:30             ` Lewis Hyatt [this message]
2022-07-17 15:24   ` [PATCH] c: Fix location for _Pragma tokens [PR97498] Lewis Hyatt
2022-07-31  2:43     ` Jeff Law
2022-07-31 12:44       ` Lewis Hyatt
2022-07-31 15:24         ` Jeff Law

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=CAA_5UQ6uM-B-mx_NfHUguAzL0UrAubB-yqP8YyzLUE07LssV-A@mail.gmail.com \
    --to=lhyatt@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --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).