2013-04-30 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / uninit-pred-loop-1_b.cc
blobe4ef3d22c069def9c054058648c2bace2414ce8a
1 /* { dg-do compile } */
2 /* { dg-options "-Wuninitialized -O2" } */
4 extern int bar();
5 int foo(int n)
7 for (;;) {
8 int err = ({int _err;
9 for (int i = 0; i < n; ++i) {
10 _err = 17;
11 _err = bar();
13 _err;
14 }); /* { dg-warning "uninitialized" "warn on _err" } */
16 if (err == 0) return 17;
19 return 18;