xref: /third_party/ltp/tools/sparse/sparse-src/validation/optim/volatile-store00.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/optim/
1f08c3bdfSopenharmony_civoid foo(volatile int *p)
2f08c3bdfSopenharmony_ci{
3f08c3bdfSopenharmony_ci	*p = 0;
4f08c3bdfSopenharmony_ci	*p = 0;
5f08c3bdfSopenharmony_ci}
6f08c3bdfSopenharmony_ci
7f08c3bdfSopenharmony_civoid bar(void)
8f08c3bdfSopenharmony_ci{
9f08c3bdfSopenharmony_ci	extern volatile int i;
10f08c3bdfSopenharmony_ci	i = 0;
11f08c3bdfSopenharmony_ci	i = 0;
12f08c3bdfSopenharmony_ci}
13f08c3bdfSopenharmony_ci
14f08c3bdfSopenharmony_ci
15f08c3bdfSopenharmony_civoid baz(void)
16f08c3bdfSopenharmony_ci{
17f08c3bdfSopenharmony_ci	volatile int i;
18f08c3bdfSopenharmony_ci	i = 0;
19f08c3bdfSopenharmony_ci	i = 0;
20f08c3bdfSopenharmony_ci}
21f08c3bdfSopenharmony_ci
22f08c3bdfSopenharmony_ci/*
23f08c3bdfSopenharmony_ci * check-name: keep volatile stores
24f08c3bdfSopenharmony_ci * check-command: test-linearize -Wno-decl -fdump-ir=final $file
25f08c3bdfSopenharmony_ci * check-output-ignore
26f08c3bdfSopenharmony_ci * check-output-pattern(6): store\\.
27f08c3bdfSopenharmony_ci */
28

Indexes created Thu Nov 07 10:32:03 CST 2024