summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/max.c
blob: e9798104228440f075a7dd1397d394e0fe23dd5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

static inline int
max (int a, int b)
{
  return a < b ? b : a;
}

int
test_00 (int a)
{
  return max (a, a + 8);
}

int
test_01 (int a)
{
  return max (a, a - 8);
}

/* { dg-final { scan-tree-dump-not "MAX_EXPR" "optimized" } } */