xref: /third_party/ltp/tools/sparse/sparse-src/validation/linear/builtin_unreachable1.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/linear/
1f08c3bdfSopenharmony_civoid die(void);
2f08c3bdfSopenharmony_ci
3f08c3bdfSopenharmony_ciint foo(int c)
4f08c3bdfSopenharmony_ci{
5f08c3bdfSopenharmony_ci	if (c)
6f08c3bdfSopenharmony_ci		return 1;
7f08c3bdfSopenharmony_ci	die();
8f08c3bdfSopenharmony_ci	__builtin_unreachable();
9f08c3bdfSopenharmony_ci}
10f08c3bdfSopenharmony_ci
11f08c3bdfSopenharmony_ci/*
12f08c3bdfSopenharmony_ci * check-name: builtin_unreachable1
13f08c3bdfSopenharmony_ci * check-command: test-linearize -Wno-decl $file
14f08c3bdfSopenharmony_ci *
15f08c3bdfSopenharmony_ci * check-output-start
16f08c3bdfSopenharmony_cifoo:
17f08c3bdfSopenharmony_ci.L0:
18f08c3bdfSopenharmony_ci	<entry-point>
19f08c3bdfSopenharmony_ci	cbr         %arg1, .L1, .L2
20f08c3bdfSopenharmony_ci
21f08c3bdfSopenharmony_ci.L1:
22f08c3bdfSopenharmony_ci	ret.32      $1
23f08c3bdfSopenharmony_ci
24f08c3bdfSopenharmony_ci.L2:
25f08c3bdfSopenharmony_ci	call        die
26f08c3bdfSopenharmony_ci	unreachable
27f08c3bdfSopenharmony_ci
28f08c3bdfSopenharmony_ci
29f08c3bdfSopenharmony_ci * check-output-end
30f08c3bdfSopenharmony_ci */
31

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