Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/uninit-pr20644.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* PR 20644 */ |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-O -Wuninitialized" } */ | |
4 int foo () | |
5 { | |
6 int i = 0; | |
7 int j; | |
8 | |
9 if (1 == i) | |
10 return j; | |
11 | |
12 return 0; | |
13 } | |
14 | |
15 int bar () | |
16 { | |
17 int i = 1; | |
18 int j; | |
19 /* { dg-warning "uninitialized" "uninitialized" { target *-*-* } .-1 } */ | |
20 | |
21 if (1 == i) | |
22 return j; | |
23 | |
24 return 0; | |
25 } |