This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/43323] [4.4 Regression] Wrong code with bitfields and type casting.



------- Comment #1 from rguenth at gcc dot gnu dot org  2010-03-10 15:55 -------
Confirmed.

extern void abort (void);
int main()
{
  struct { unsigned bar:1; } foo;
  foo.bar = 0x1;
  if ((unsigned char)(foo.bar * 0xfe) != 0xfeu)
    abort ();
  if ((unsigned char)(foo.bar * 0xff) != 0xffu)
    abort ();
  return 0;
}


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-code
      Known to fail|                            |4.4.0 4.4.3
      Known to work|                            |4.3.4 4.5.0
   Last reconfirmed|0000-00-00 00:00:00         |2010-03-10 15:55:16
               date|                            |
            Summary|Wrong code with bitfields   |[4.4 Regression] Wrong code
                   |and type casting.           |with bitfields and type
                   |                            |casting.
   Target Milestone|---                         |4.4.4


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]