2014-02-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
[official-gcc.git] / gcc / testsuite / g++.dg / uninit-pred-loop-1_a.cc
blob835cdbae320a97a3d9541c8598681757ce59c223
1 /* { dg-do compile } */
2 /* { dg-options "-Wuninitialized -O2" } */
4 extern int bar();
5 int foo(void)
7 for (;;) {
8 int err = ({int _err; /* { dg-bogus "uninitialized" "false warning" } */
9 for (int i = 0; i < 16; ++i) {
10 _err = 17;
11 _err = bar();
13 _err; /* { dg-bogus "uninitialized" "false warning" } */
14 });
16 if (err == 0) return 17;
19 return 18;