xref: /third_party/ltp/tools/sparse/sparse-src/validation/mem2reg/init-local64.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/mem2reg/
1f08c3bdfSopenharmony_ciint ssimple(void)
2f08c3bdfSopenharmony_ci{
3f08c3bdfSopenharmony_ci	struct {
4f08c3bdfSopenharmony_ci		int a;
5f08c3bdfSopenharmony_ci	} s;
6f08c3bdfSopenharmony_ci
7f08c3bdfSopenharmony_ci	s.a = 1;
8f08c3bdfSopenharmony_ci	return s.a;
9f08c3bdfSopenharmony_ci}
10f08c3bdfSopenharmony_ci
11f08c3bdfSopenharmony_cidouble sdouble(void)
12f08c3bdfSopenharmony_ci{
13f08c3bdfSopenharmony_ci	struct {
14f08c3bdfSopenharmony_ci		double a;
15f08c3bdfSopenharmony_ci	} s;
16f08c3bdfSopenharmony_ci
17f08c3bdfSopenharmony_ci	s.a = 1.23;
18f08c3bdfSopenharmony_ci	return s.a;
19f08c3bdfSopenharmony_ci}
20f08c3bdfSopenharmony_ci
21f08c3bdfSopenharmony_ci/*
22f08c3bdfSopenharmony_ci * check-name: init-local64
23f08c3bdfSopenharmony_ci * check-command: test-linearize -Wno-decl -m64 -fdump-ir=mem2reg $file
24f08c3bdfSopenharmony_ci * check-output-ignore
25f08c3bdfSopenharmony_ci * check-output-excludes: load\\.
26f08c3bdfSopenharmony_ci * check-output-excludes: store\\.
27f08c3bdfSopenharmony_ci */
28

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