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 tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store


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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-05-22
     Ever Confirmed|0                           |1

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-22 10:47:53 UTC ---
Confirmed.  The following C testcase works correctly:

struct S { _Bool b : 1; char c : 7; };
void bar (struct S s)
{
  if (s.c != 7)
    abort ();
}
int foo (_Bool b)
{
  struct S s;
  s.c = 7;
  s.b = b;
  bar (s);
  return s.c;
}

but for some reason your reduced testcase ends up producing a MEM_REF
instead of a component-ref to store b instead.


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