public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/95021] New: [10/11 Regression] Bogus -Wclobbered warning
@ 2020-05-09 16:14 hjl.tools at gmail dot com
  2020-05-09 19:19 ` [Bug middle-end/95021] " hjl.tools at gmail dot com
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: hjl.tools at gmail dot com @ 2020-05-09 16:14 UTC (permalink / raw)
  To: gcc-bugs

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.

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

end of thread, other threads:[~2023-07-07  8:50 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09 16:14 [Bug middle-end/95021] New: [10/11 Regression] Bogus -Wclobbered warning hjl.tools at gmail dot com
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

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).