aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/pr59223.c
blob: 471c0625df33342fcb62a9fa48d4417b949227de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* PR c/59223 */
/* { dg-do compile } */
/* { dg-options "-O2 -Wmaybe-uninitialized" } */

int foo (int x)
{
  int y;
  if (x == 0)
    y = 1;
  else if (x == 1)
    y = 2;
  return y; /* { dg-warning "may be used uninitialized in this function" } */
}