public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/95021] New: [10/11 Regression] Bogus -Wclobbered warning
Date: Sat, 09 May 2020 16:14:03 +0000	[thread overview]
Message-ID: <bug-95021-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 95021
           Summary: [10/11 Regression] Bogus -Wclobbered warning
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

On Linux/x86-64, GCC 10 and 11 give

[hjl@gnu-skx-1 creduce-1]$ cat foo.i
typedef long long a;
struct __jmp_buf_tag   {
};
typedef struct __jmp_buf_tag sigjmp_buf[1];
sigjmp_buf jmp_buf;
int __sigsetjmp (sigjmp_buf, int);
typedef struct {
  a target;
} b;
extern a *target_p;
b *c;
extern void e (a);
void
d(void)
{
  if (__sigsetjmp(jmp_buf, 1)) {
    a target = *target_p;
    c->target = target;
    e(target);
  }
}
[hjl@gnu-skx-1 creduce-1]$ /usr/gcc-10.1.1-x32/bin/gcc -m32 -O2 -W foo.i -S
foo.i: In function ??d??:
foo.i:17:7: warning: variable ??target?? might be clobbered by ??longjmp?? or
??vfork?? [-Wclobbered]
   17 |     a target = *target_p;
      |       ^~~~~~
[hjl@gnu-skx-1 creduce-1]$ 

GCC 9.3 is OK.

             reply	other threads:[~2020-05-09 16:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-09 16:14 hjl.tools at gmail dot com [this message]
2020-05-09 19:19 ` [Bug middle-end/95021] " hjl.tools at gmail dot com
2020-05-11  1:26 ` hjl.tools at gmail dot com
2020-05-11  6:44 ` rguenth at gcc dot gnu.org
2020-05-12 13:08 ` hjl.tools at gmail dot com
2020-05-12 13:34 ` hjl.tools at gmail dot com
2020-05-12 13:50 ` rguenther at suse dot de
2020-05-12 20:08 ` hjl.tools at gmail dot com
2020-05-13 13:28 ` hjl.tools at gmail dot com
2020-05-17 17:13 ` cvs-commit at gcc dot gnu.org
2020-05-17 17:14 ` hjl.tools at gmail dot com
2020-05-18 19:01 ` ro at gcc dot gnu.org
2020-07-23  6:51 ` rguenth at gcc dot gnu.org
2021-01-14  8:43 ` [Bug middle-end/95021] [10 " rguenth at gcc dot gnu.org
2021-01-14  9:27 ` ro at CeBiTec dot Uni-Bielefeld.DE
2021-01-14 10:12 ` rguenth at gcc dot gnu.org
2021-01-14 11:56 ` ro at CeBiTec dot Uni-Bielefeld.DE
2021-01-14 12:19 ` rguenth at gcc dot gnu.org
2021-01-14 15:05 ` cvs-commit at gcc dot gnu.org
2021-01-14 15:46 ` hjl.tools at gmail dot com
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2022-06-28 10:40 ` jakub at gcc dot gnu.org
2023-07-07  8:50 ` rguenth 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-95021-4@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).