public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/51444] New: [4.4 Regression]: Spurious "is used uninitialized" warning for structure with bitfields
@ 2011-12-07 0:23 hp at gcc dot gnu.org
2011-12-07 0:32 ` [Bug tree-optimization/51444] " hp at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: hp at gcc dot gnu.org @ 2011-12-07 0:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51444
Bug #: 51444
Summary: [4.4 Regression]: Spurious "is used uninitialized"
warning for structure with bitfields
Classification: Unclassified
Product: gcc
Version: 4.4.7
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hp@gcc.gnu.org
Host: x64_86-unknown-linux-gnu
Target: cris-axis-elf, x64_86-unknown-linux-gnu
Created attachment 26012
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26012
testcase to be compiled with "-O2 -Wuninitialized"
For 4.4 and the attached code, spurious warnings are emitted when compiling
with -O2 -Wuninitialized (or -O2 -Wall):
/n/slask/hp_tmp/foo.c: In function 'foo2d2':
/n/slask/hp_tmp/foo.c:63: warning: 'r' is used uninitialized in this function
/n/slask/hp_tmp/foo.c: In function 'foo':
/n/slask/hp_tmp/foo.c:44: warning: 'r' is used uninitialized in this function
There should be no warnings, as the structures are initialized; one member
explicitly and the rest implicitly to zero.
Note the similarity between the structures and the three functions: by adding
another member *after* the used one (adjusting the size of one member, so the
whole struct fits within 32 bits) the warning disappears, but reappears when
the "use" is changed to that new last member. All targets; presence on
4.4-branch verified for r180236.
Absence is verified for 4.3 r181718, 4.5 r181718, 4.6 r182058 and trunk
r182065.
Setting component to "tree-optimization" somewhat speculatively but on the
grounds that -O2 is required and the warning appears for at least both host
x86_64 (at least in F 12 gcc-4.4.3-4.fc12.x86_64 as well as "Debian 4.4.5-8")
and cris-elf (svn revisions above).
I'm not sure this bug is worth fixing since it's already fixed in two later
major releases, mostly providing this PR as a placeholder: I couldn't find an
existing matching PR.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/51444] [4.4 Regression]: Spurious "is used uninitialized" warning for structure with bitfields
2011-12-07 0:23 [Bug tree-optimization/51444] New: [4.4 Regression]: Spurious "is used uninitialized" warning for structure with bitfields hp at gcc dot gnu.org
@ 2011-12-07 0:32 ` hp at gcc dot gnu.org
2011-12-07 12:56 ` rguenth at gcc dot gnu.org
2012-03-13 17:03 ` jakub at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: hp at gcc dot gnu.org @ 2011-12-07 0:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51444
Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-12-07
Known to work| |4.3.6, 4.5.4, 4.6.3, 4.7.0
Ever Confirmed|0 |1
Known to fail| |4.4.7
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/51444] [4.4 Regression]: Spurious "is used uninitialized" warning for structure with bitfields
2011-12-07 0:23 [Bug tree-optimization/51444] New: [4.4 Regression]: Spurious "is used uninitialized" warning for structure with bitfields hp at gcc dot gnu.org
2011-12-07 0:32 ` [Bug tree-optimization/51444] " hp at gcc dot gnu.org
@ 2011-12-07 12:56 ` rguenth at gcc dot gnu.org
2012-03-13 17:03 ` jakub at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-07 12:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51444
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.4.7
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-07 12:55:36 UTC ---
Probably fixed as side-effect of some fix. If you identify the revision
that fixed it the branch maintainer could assess whether a backport is
a good idea at this stage.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/51444] [4.4 Regression]: Spurious "is used uninitialized" warning for structure with bitfields
2011-12-07 0:23 [Bug tree-optimization/51444] New: [4.4 Regression]: Spurious "is used uninitialized" warning for structure with bitfields hp at gcc dot gnu.org
2011-12-07 0:32 ` [Bug tree-optimization/51444] " hp at gcc dot gnu.org
2011-12-07 12:56 ` rguenth at gcc dot gnu.org
@ 2012-03-13 17:03 ` jakub at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-13 17:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51444
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution| |FIXED
Target Milestone|4.4.7 |4.5.4
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-13 13:30:43 UTC ---
Fixed in 4.5+, 4.4 is no longer supported.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-13 17:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-07 0:23 [Bug tree-optimization/51444] New: [4.4 Regression]: Spurious "is used uninitialized" warning for structure with bitfields hp at gcc dot gnu.org
2011-12-07 0:32 ` [Bug tree-optimization/51444] " hp at gcc dot gnu.org
2011-12-07 12:56 ` rguenth at gcc dot gnu.org
2012-03-13 17:03 ` jakub 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).