comparison gcc/testsuite/c-c++-common/pr59223.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* PR c/59223 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -Wmaybe-uninitialized" } */
4
5 int foo (int x)
6 {
7 int y;
8 if (x == 0)
9 y = 1;
10 else if (x == 1)
11 y = 2;
12 return y; /* { dg-warning "may be used uninitialized in this function" } */
13 }