summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wstrict-overflow-20.c
blob: 207162d0e8e1303de564cd8d07133845a101f346 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow" } */

/* Don't warn about an overflow in a copied loop header.  We used to
   get a warning in value numbering.  This is PR 33565.  */

void f (int m, int n)
{
  int j;
 
  for (j = m; j	< m + 10 && j <	n; j ++)
    do_something (j);
}