public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tschwinge at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/101551] [offloading] Differences in diagnostics etc.
Date: Mon, 06 Sep 2021 13:42:22 +0000	[thread overview]
Message-ID: <bug-101551-4-RVpkgRHOeK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101551-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
I've noticed that with an offloading-enabled build of GCC we're losing "note:
in expansion of macro '[...]'" diagnostics.  (Effectively
'-ftrack-macro-expansion=0'?)

For example, 'libgomp.oacc-c-c++-common/vred2d-128.c' with '-fopenacc
-Wuninitialized' for a (default) GCC build without
'--enable-offload-targets=[...]':

    [...]
    [...]/libgomp.oacc-c-c++-common/vred2d-128.c: In function ‘test1’:
    [...]/libgomp.oacc-c-c++-common/vred2d-128.c:34:8: warning: ‘t1’ is used
uninitialized [-Wuninitialized]
       34 |          "acc loop vector reduction(+:t1) reduction(-:t2)")
          |        ^ ~
    [...]/libgomp.oacc-c-c++-common/vred2d-128.c:11:14: note: ‘t1’ was declared
here
       11 |   long i, j, t1, t2, t3;                        \
          |              ^~
    [...]/libgomp.oacc-c-c++-common/vred2d-128.c:33:1: note: in expansion of
macro ‘gentest’
       33 | gentest (test1, "acc parallel loop gang vector_length (128)
firstprivate (t1, t2)",
          | ^~~~~~~
    [...]/libgomp.oacc-c-c++-common/vred2d-128.c:34:8: warning: ‘t2’ is used
uninitialized [-Wuninitialized]
    [...]

... vs. a GCC build with '--enable-offload-targets=[...]':

    [...]
    [...]/libgomp.oacc-c-c++-common/vred2d-128.c: In function ‘test1’:
    [...]/libgomp.oacc-c-c++-common/vred2d-128.c:34:8: warning: ‘t1’ is used
uninitialized [-Wuninitialized]
       34 |          "acc loop vector reduction(+:t1) reduction(-:t2)")
          |        ^ ~
    [...]/libgomp.oacc-c-c++-common/vred2d-128.c:11:14: note: ‘t1’ was declared
here
       11 |   long i, j, t1, t2, t3;                        \
          |              ^~
    [...]/libgomp.oacc-c-c++-common/vred2d-128.c:34:8: warning: ‘t2’ is used
uninitialized [-Wuninitialized]
    [...]

Note that an explicit '-foffload=disable' does not cure this.

  parent reply	other threads:[~2021-09-06 13:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21 12:34 [Bug middle-end/101551] New: " tschwinge at gcc dot gnu.org
2021-07-21 13:01 ` [Bug middle-end/101551] " tschwinge at gcc dot gnu.org
2021-09-06 13:42 ` tschwinge at gcc dot gnu.org [this message]
2022-07-12  6:28 ` cvs-commit at gcc dot gnu.org

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=bug-101551-4-RVpkgRHOeK@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).