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:
Joey Ye 2011-12-26 08:43:48 +00:00 committed by Joey Ye
parent 6a7cc8eaf4
commit f93519addb
2 changed files with 20 additions and 0 deletions

View File

@ -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

View 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;
}