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

/* Source: Ian Lance Taylor.  */

int
foo (int i)
{
  return __builtin_abs (i) >= 0; /* { dg-warning "assuming signed overflow does not occur" "correct warning" } */
}