comparison: partially fix how links are updated
[smatch.git] / validation / sm_compare12.c
blob2f520731060f7f30cccf1a98a2dbd1003ed687c6
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 a, b, c, d;
9 static int options_write(void)
11 a = min_t(int, b + c, d);
12 __smatch_compare(a, d);
13 __smatch_compare(a, b + c);
17 * check-name: smatch compare #12
18 * check-command: smatch -I.. sm_compare12.c
20 * check-output-start
21 sm_compare12.c:12 options_write() a <= d
22 sm_compare12.c:13 options_write() a <= b + c
23 * check-output-end