foo(volatile int * p)1*c85f09ccSJohn Levon void foo(volatile int *p)
2*c85f09ccSJohn Levon {
3*c85f09ccSJohn Levon 	*p = 0;
4*c85f09ccSJohn Levon 	*p = 0;
5*c85f09ccSJohn Levon }
6*c85f09ccSJohn Levon 
bar(void)7*c85f09ccSJohn Levon void bar(void)
8*c85f09ccSJohn Levon {
9*c85f09ccSJohn Levon 	extern volatile int i;
10*c85f09ccSJohn Levon 	i = 0;
11*c85f09ccSJohn Levon 	i = 0;
12*c85f09ccSJohn Levon }
13*c85f09ccSJohn Levon 
14*c85f09ccSJohn Levon 
baz(void)15*c85f09ccSJohn Levon void baz(void)
16*c85f09ccSJohn Levon {
17*c85f09ccSJohn Levon 	volatile int i;
18*c85f09ccSJohn Levon 	i = 0;
19*c85f09ccSJohn Levon 	i = 0;
20*c85f09ccSJohn Levon }
21*c85f09ccSJohn Levon 
22*c85f09ccSJohn Levon /*
23*c85f09ccSJohn Levon  * check-name: keep volatile stores
24*c85f09ccSJohn Levon  * check-command: test-linearize -Wno-decl -fdump-ir=final $file
25*c85f09ccSJohn Levon  * check-output-ignore
26*c85f09ccSJohn Levon  * check-output-pattern(6): store\\.
27*c85f09ccSJohn Levon  */
28