xref: /third_party/ltp/tools/sparse/sparse-src/validation/linear/goto-stmt-expr-short-circuit.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/linear/
1f08c3bdfSopenharmony_ciint foo(int p)
2f08c3bdfSopenharmony_ci{
3f08c3bdfSopenharmony_ci	goto inside;
4f08c3bdfSopenharmony_ci	if (0 && ({
5f08c3bdfSopenharmony_ciinside:
6f08c3bdfSopenharmony_ci		return 1;
7f08c3bdfSopenharmony_ci		2;
8f08c3bdfSopenharmony_ci		}))
9f08c3bdfSopenharmony_ci		return 3;
10f08c3bdfSopenharmony_ci	return 4;
11f08c3bdfSopenharmony_ci}
12f08c3bdfSopenharmony_ci
13f08c3bdfSopenharmony_ciint bar(int p)
14f08c3bdfSopenharmony_ci{
15f08c3bdfSopenharmony_ci	if (0 && ({
16f08c3bdfSopenharmony_ciinside:
17f08c3bdfSopenharmony_ci		return 1;
18f08c3bdfSopenharmony_ci		2;
19f08c3bdfSopenharmony_ci		}))
20f08c3bdfSopenharmony_ci		return 3;
21f08c3bdfSopenharmony_ci	goto inside;
22f08c3bdfSopenharmony_ci}
23f08c3bdfSopenharmony_ci
24f08c3bdfSopenharmony_ci/*
25f08c3bdfSopenharmony_ci * check-name: goto-stmt-expr-short-circuit
26f08c3bdfSopenharmony_ci * check-command: test-linearize -Wno-decl $file
27f08c3bdfSopenharmony_ci *
28f08c3bdfSopenharmony_ci * check-error-ignore
29f08c3bdfSopenharmony_ci * check-output-ignore
30f08c3bdfSopenharmony_ci * check-output-excludes: END
31f08c3bdfSopenharmony_ci */
32

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