gcc/
[official-gcc.git] / gcc / testsuite / gcc.dg / pr58145-1.c
blob0e236c0456d26b28e039f2e8415e613a84286f24
1 /* PR tree-optimization/58145 */
2 /* { dg-do compile { target { int32plus } } } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
5 struct S { unsigned int data : 32; };
6 struct T { unsigned int data; };
7 volatile struct S s2;
9 void
10 f1 (int val)
12 struct S s = { .data = val };
13 *(volatile struct S *) 0x880000UL = s;
16 void
17 f2 (int val)
19 struct T t = { .data = val };
20 *(volatile struct T *) 0x880000UL = t;
23 void
24 f3 (int val)
26 *(volatile unsigned int *) 0x880000UL = val;
29 void
30 f4 (int val)
32 struct S s = { .data = val };
33 s2 = s;
36 /* { dg-final { scan-tree-dump-times " ={v} " 4 "optimized" } } */
37 /* { dg-final { cleanup-tree-dump "optimized" } } */