aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp.h
blob: 079013a81017236bef417d4a2a6bdb6b84fe91df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
extern void link_error(void);

#define RANGE(name, min, max) \
  if (name < min || name > max) \
    return;
#define ANTI_RANGE(name, min, max) \
  if (name >= min && name <= max) \
    return;
#define MERGE(cond, name1, name2) \
  if (cond) \
    name1 = name2;
#define CHECK_RANGE(expr, min, max) \
  do { \
     __typeof__ (expr) v = (expr); \
     if (v < min) link_error(); \
     if (v > max) link_error(); \
     if (v < min || v > max) link_error (); \
  } while (0) 
#define CHECK_ANTI_RANGE(expr, min, max) \
  do { \
    __typeof__ (expr) v = (expr); \
    if (v >= min) \
      if (v <= max) \
        link_error(); \
    if (v >= min && v <= max) \
      link_error(); \
  } while (0)