public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/26534]  New: bitfield wrong optimize
@ 2006-03-02 21:23 s__nakayama at infoseek dot jp
  2006-03-02 21:35 ` [Bug tree-optimization/26534] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: s__nakayama at infoseek dot jp @ 2006-03-02 21:23 UTC (permalink / raw)
  To: gcc-bugs

#include <stdio.h>
struct X
{
  unsigned a:4;
};

int main()
{
  struct X x = { 63u };
  printf("%u\n", x.a);
  return 0;
}
// end.

result:
g++    bug.cpp; ./a 
15

g++ -O bug.cpp; ./a
63
wrong result!!


-- 
           Summary: bitfield wrong optimize
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: s__nakayama at infoseek dot jp


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


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

end of thread, other threads:[~2006-05-01  2:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-02 21:23 [Bug c++/26534] New: bitfield wrong optimize s__nakayama at infoseek dot jp
2006-03-02 21:35 ` [Bug tree-optimization/26534] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-03-03 12:07 ` [Bug c++/26534] " rguenth at gcc dot gnu dot org
2006-04-08 18:56 ` pinskia at gcc dot gnu dot org
2006-04-16 18:41 ` mmitchel at gcc dot gnu dot org
2006-04-18 15:27 ` bonzini at gnu dot org
2006-04-19 17:12 ` mmitchel at gcc dot gnu dot org
2006-04-22 22:14 ` mmitchel at gcc dot gnu dot org
2006-04-23  3:16 ` mmitchel at gcc dot gnu dot org
2006-04-23 18:04 ` mmitchel at gcc dot gnu dot org
2006-04-23 18:05 ` [Bug c++/26534] [4.1] " mmitchel at gcc dot gnu dot org
2006-05-01  2:18 ` mmitchel at gcc dot gnu dot org
2006-05-01  2:18 ` mmitchel at gcc dot gnu dot 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).