This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/65686] [5/6 regression] inconsistent warning maybe-uninitialized: warn about 'unsigned', not warn about 'int'
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 28 Jan 2016 10:59:52 +0000
- Subject: [Bug middle-end/65686] [5/6 regression] inconsistent warning maybe-uninitialized: warn about 'unsigned', not warn about 'int'
- Auto-submitted: auto-generated
- References: <bug-65686-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65686
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #9)
> So, does the https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13962#c9 patch
> help here?
Yes. With it we simplify the function during early FRE to
f (struct S * e)
{
mytype x;
mytype * _4;
unsigned int _6;
mytype _8;
<bb 2>:
_4 = e_3(D)->pu;
_6 = MEM[(char * {ref-all})_4];
MEM[(char * {ref-all})&x] = _6;
_8 = x;
x ={v} {CLOBBER};
return _8;
(missed optimization - alias stmt walking doesn't honor edge non-executablility
as figured out by FRE). Later optimization turns this into
<bb 2>:
_3 = e_2(D)->pu;
_4 = MEM[(char * {ref-all})_3];
return _4;