Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/pr48784-2.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* { dg-do run } */ | |
2 /* { dg-require-effective-target size32plus } */ | |
3 /* { dg-options "-fno-strict-volatile-bitfields" } */ | |
4 | |
5 extern void abort (void); | |
6 | |
7 #pragma pack(1) | |
8 volatile struct S0 { | |
9 signed a : 7; | |
10 unsigned b : 28; /* b can't be fetched with an aligned 32-bit access, */ | |
11 /* but it certainly can be fetched with an unaligned access */ | |
12 } g = {0,0xfffffff}; | |
13 | |
14 int main() { | |
15 unsigned b = g.b; | |
16 if (b != 0xfffffff) | |
17 abort (); | |
18 return 0; | |
19 } |