re PR middle-end/51200 (Wrong code sequence to store restrict volatile bitfield)
2011-12-26 Joey Ye <joey.ye@arm.com> PR middle-end/51200 * gcc.dg/volatile-bitfields-2.c: New test. From-SVN: r182685
This commit is contained in:
parent
6a7cc8eaf4
commit
f93519addb
@ -1,3 +1,8 @@
|
||||
2011-12-26 Joey Ye <joey.ye@arm.com>
|
||||
|
||||
PR middle-end/51200
|
||||
* gcc.dg/volatile-bitfields-2.c: New test.
|
||||
|
||||
2011-12-23 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/51507
|
||||
|
15
gcc/testsuite/gcc.dg/volatile-bitfields-2.c
Normal file
15
gcc/testsuite/gcc.dg/volatile-bitfields-2.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-fstrict-volatile-bitfields" } */
|
||||
|
||||
extern void abort(void);
|
||||
struct thing {
|
||||
volatile unsigned short a: 8;
|
||||
volatile unsigned short b: 8;
|
||||
} t = {1,2};
|
||||
|
||||
int main()
|
||||
{
|
||||
t.a = 3;
|
||||
if (t.a !=3 || t.b !=2) abort();
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user