aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/canonical-cmpe-minmax.c
blob: c72819244b95cdbf466df9b562443c7ecb7fe867 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#define SMAX __INT_MAX__
#define SMIN (-__INT_MAX__-1)

int le_smax(int a) { return (a <= (SMAX - 1)) == (a != SMAX); }
int gt_smax(int a) { return (a >  (SMAX - 1)) == (a == SMAX); }

int lt_smin(int a) { return (a <  (SMIN + 1)) == (a == SMIN); }
int ge_smin(int a) { return (a >= (SMIN + 1)) == (a != SMIN); }

/*
 * check-name: canonical-cmpe-minmax
 * check-command: test-linearize -Wno-decl $file
 * check-known-to-fail
 *
 * check-output-ignore
 * check-output-returns: 1
 */