[Bug middle-end/21161] [6/7/8 Regression] "clobbered by longjmp" warning ignores the data flow
bergner at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Mar 3 23:01:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21161
Peter Bergner <bergner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bergner at gcc dot gnu.org
--- Comment #13 from Peter Bergner <bergner at gcc dot gnu.org> ---
In case you haven't creduce'd the test case yet, here's what I got:
bergner@pike:~/gcc/BUGS/PR21161$ cat pr21161.i
extern int _setjmp (void);
typedef struct { long a; } * b;
extern void d (void);
void
c (b obj)
{
_setjmp();
if (((b)0)->a)
obj = 0;
if (((b)obj)->a)
d();
}
bergner@pike:~/gcc/BUGS/PR21161$
/home/bergner/gcc/build/gcc-fsf-mainline-debug/gcc/xgcc
-B/home/bergner/gcc/build/gcc-fsf-mainline-debug/gcc -W -O1 -S pr21161.i
pr21161.i: In function ‘c’:
pr21161.i:5:6: warning: argument ‘obj’ might be clobbered by ‘longjmp’ or
‘vfork’ [-Wclobbered]
c (b obj)
~~^~~
More information about the Gcc-bugs
mailing list