public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49525] New: [4.4] wrong code and wrong warning for bitfield related operations
@ 2011-06-24 22:21 marcin.slusarz at gmail dot com
  2011-06-24 22:21 ` [Bug c++/49525] " marcin.slusarz at gmail dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: marcin.slusarz at gmail dot com @ 2011-06-24 22:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49525

           Summary: [4.4] wrong code and wrong warning for bitfield
                    related operations
           Product: gcc
           Version: 4.4.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marcin.slusarz@gmail.com


Created attachment 24595
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24595
testcase

Compilation of attached file generates wrong warning:
$ g++-4.4.5 -c -O2 -Wall all.c
all.c: In function ‘void test(const st_src_reg*, ureg_dst)’:
all.c:118: warning: ‘reg’ is used uninitialized in this function
all.c:118: note: ‘reg’ was declared here

And produces wrong code - at random after "test" function, src[i].Negate (one
bit unsigned bit-field) becomes 1 when src_reg[i]->negate == 0 - something
which should not happen.

The bug does not manifest when compiled with gcc instead of g++ or with g++
4.3.5 or 4.5.2.


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

end of thread, other threads:[~2011-10-09 15:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-24 22:21 [Bug c++/49525] New: [4.4] wrong code and wrong warning for bitfield related operations marcin.slusarz at gmail dot com
2011-06-24 22:21 ` [Bug c++/49525] " marcin.slusarz at gmail dot com
2011-06-24 22:24 ` marcin.slusarz at gmail dot com
2011-06-24 22:38 ` marcin.slusarz at gmail dot com
2011-06-24 22:38 ` marcin.slusarz at gmail dot com
2011-06-25 12:24 ` mikpe at it dot uu.se
2011-06-25 12:55 ` mikpe at it dot uu.se
2011-06-25 15:46 ` bryancain3+gcc at gmail dot com
2011-06-25 16:41 ` mikpe at it dot uu.se
2011-06-25 18:47 ` marcin.slusarz at gmail dot com
2011-06-25 20:23 ` mikpe at it dot uu.se
2011-06-26 12:48 ` marcin.slusarz at gmail dot com
2011-10-09 15:00 ` paolo.carlini at oracle dot com

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