aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/load-semi-volatile.c
blob: ae3b548b8bd350939dea6368bddff4ec25df4acd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
struct s {
	volatile int a;
};

struct s s;

void foo(void)
{
	s;
	s.a;
}

/*
 * check-name: load-semi-volatile
 * check-command: test-linearize -Wno-decl $file
 *
 * check-output-ignore
 * check-output-pattern(1): load
 *
 * check-description:
 *	The load at line 9 must be removed.
 *	The load at line 10 is volatile and thus
 *	must not be removed.
 */