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