aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/canonical-cmps-minmax.c
blob: bab09282d241d6381798202a13eb8982c12dcfcd (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 lt_smax(int a) { return (a <  SMAX) == (a != SMAX); }
int ge_smax(int a) { return (a >= SMAX) == (a == SMAX); }

int le_smin(int a) { return (a <= SMIN) == (a == SMIN); }
int gt_smin(int a) { return (a >  SMIN) == (a != SMIN); }

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