Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/pr48784-1.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line source
/* { dg-do run } */ /* { dg-require-effective-target size32plus } */ /* { dg-options "-fstrict-volatile-bitfields" } */ extern void abort (void); #pragma pack(1) volatile struct S0 { signed a : 7; unsigned b : 28; /* b can't be fetched with an aligned 32-bit access, */ /* but it certainly can be fetched with an unaligned access */ } g = {0,0xfffffff}; int main() { unsigned b = g.b; if (b != 0xfffffff) abort (); return 0; }