xref: /illumos-gate/usr/src/tools/smatch/src/validation/bug_inline_switch.c (revision 856f710c9dc323b39da5935194d7928ffb99b67f)
1 
2 #define __u16 unsigned short
3 int foo(__u16 n);
4 static inline __u16 f(__u16 val)
5 {
6        return val;
7 }
8 
9 static inline unsigned int bar(__u16 n)
10 {
11       switch (n) {
12       case (1 ? 1 : f(1)):
13               return 4;
14       }
15 }
16 
17 int foo(__u16 n)
18 {
19        bar(n);
20        bar(n);
21        return 0;
22 }
23 /*
24  * check-name: inlining switch statement
25  */
26