param_key: use get_name_sym_from_key() instead of return_state_to_var_sym()
[smatch.git] / validation / sm_switch3.c
blob0478ef0bd6ed61479a56b68842ee8c820e4f9293
1 #include "check_debug.h"
3 int a, b;
5 int frob(void);
7 int test(int size)
9 a = 0;
11 if (({switch (frob()) {
12 case 1:
13 a = 2;
14 break;
15 default:
16 a = 3;
18 b;}))
20 __smatch_implied(a);
22 a = 4;
24 if (({switch (2) {
25 case 1:
26 a = 5;
27 break;
28 case 2:
29 a = 6;
30 break;
31 default:
32 a = 7;
34 b;}))
36 __smatch_implied(a);
38 return 0;
42 * check-name: smatch: switch #3
43 * check-command: smatch -I.. sm_switch3.c
45 * check-output-start
46 sm_switch3.c:20 test() implied: a = '2-3'
47 sm_switch3.c:36 test() implied: a = '6'
48 * check-output-end