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

Petr Tesarik <gcc-bugs at tesarici dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gcc-bugs at tesarici dot cz

--- Comment #9 from Petr Tesarik <gcc-bugs at tesarici dot cz> 2012-02-02 
11:00:50 UTC ---
OK, my minimal test case removed the "volatile" keyword by mistake.

The real code in BTRFS has the volatile for the lock value which precedes the
bitfield, so the corresponding structure would be:

struct x {
    long a;
    volatile unsigned int lock;   /* <- note the "volatile" here */
    unsigned int full : 1;
};

Now, GCC should honour that the value of "lock" can change any time, so it must
not assume that writing back the same value a few cycles later is safe.

Reply via email to