Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-pr65178.c
blob21eb354fa7e175e0681145da58d4cb1c02f9f605
1 /* PR tree-optimizatiom/65178 - incorrect -Wmaybe-uninitialized when using
2 nested loops
3 { dg-do compile }
4 { dg-options "-O2 -Wall" } */
6 void *bar (int);
8 char *foo (void)
10 char *c = "bla";
11 char *buf;
12 for (int a = 1;; a = 0)
14 for (char *s = c; *s; ++s)
17 if (!a) break;
18 buf = (char *) bar (1);
20 return buf; // { dg-bogus "\\\[-Wmaybe-uninitialized" }