db/fixup_kernel.sh: hack handling of _parse_integer()
[smatch.git] / validation / sm_compare12.c
blobc19828c153618eb3b1e5ce92979426330082293c
1 #include "check_debug.h"
3 #define min_t(type, x, y) ({ \
4 type __min1 = (x); \
5 type __min2 = (y); \
6 __min1 < __min2 ? __min1: __min2; })
8 int frob();
10 static int options_write(void)
12 int a = frob();
13 int b = frob();
14 int c = frob();
15 int d = frob();
17 a = min_t(int, b + c, d);
18 __smatch_compare(a, d);
19 __smatch_compare(a, b + c);
20 b++;
21 __smatch_compare(a, b + c);
25 * check-name: smatch compare #12
26 * check-command: smatch -I.. sm_compare12.c
28 * check-output-start
29 sm_compare12.c:18 options_write() a <= d
30 sm_compare12.c:19 options_write() a <= b + c
31 sm_compare12.c:21 options_write() a <none> b + c
32 * check-output-end