[Bug target/52080] New: Stores to bitfields introduce a store-data-race on adjacent data

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 1 10:07:00 GMT 2012


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

             Bug #: 52080
           Summary: Stores to bitfields introduce a store-data-race on
                    adjacent data
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org
            Target: ia64-*-linux


For the following testcase we generate a 8 byte RMW cycle on IA64 which
causes locking problems in the linux kernel btrfs filesystem.

struct x {
    long a;
    unsigned int lock;
    unsigned int full : 1;
};

void
wrong(struct x *ptr)
{
  ptr->full = 1;
}



More information about the Gcc-bugs mailing list