Revert DECL_USER_ALIGN part of r241959
[official-gcc.git] / gcc / testsuite / gcc.dg / pr56997-4.c
blobecca9c69c20c001ea76fff83297d55f739f7dfe3
1 /* Test volatile access to unaligned field. */
2 /* { dg-do compile } */
3 /* { dg-options "-fno-strict-volatile-bitfields -fdump-rtl-final" } */
5 #define test_type unsigned short
7 typedef struct s{
8 unsigned char Prefix[1];
9 volatile test_type Type;
10 }__attribute((__packed__,__aligned__(4))) ss;
12 extern volatile ss v;
14 void
15 foo (test_type u)
17 v.Type = u;
20 /* The C++ memory model forbids data store race conditions outside the
21 unaligned data member, therefore only QI or HI access is allowed, no SI. */
22 /* { dg-final { scan-rtl-dump-not "mem/v(/.)*:SI" "final" } } */