aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/gcc/testsuite/gcc.dg/strict-overflow-4.c
blob: 1a8c4ed433034e104c0807dc2af0c04252f2f338 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-options "-fstrict-overflow -O2 -fdump-tree-optimized" } */

/* Source: Ian Lance Taylor.  Dual of no-strict-overflow-4.c.  */

/* We can only simplify the conditional when using strict overflow
   semantics.  */

int
foo (int i)
{
  return i + 1 > i;
}

/* We expect to see "<bb N>"; confirm that, so that we know to count
   it in the real test.  */
/* { dg-final { scan-tree-dump-times "<bb\[^>\]*>" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times ">|<" 2 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */