blob: 1ac7169515a614f9fd20e734284bf0f7d5e5fff8 [file] [log] [blame]
/* { dg-options "-m64 -Os" } */
/* { dg-final { scan-assembler-not " orq\t" } } */
/* Radar 6020402 - GCC 4.2.1/x86_64 coalesces accesses to 32-bit bitfield and
adjacent volatile qualified "int" embedded in a struct.
This test case makes sure that a 64-bit OR is not used to store to
the bit field "a", which would interfere with the volatile field "i".
*/
typedef struct {
long l;
unsigned a:1, b:31;
volatile unsigned i;
} S;
S s;
void f() {
s.a = 1;
}