1 /* PR tree-optimizatiom/65178 - incorrect -Wmaybe-uninitialized when using
2 nested loops
3 { dg-do compile }
4 { dg-options "-O2 -Wall" } */
5
6 void *bar (int);
7
8 char *foo (void)
9 {
10 char *c = "bla";
11 char *buf;
12 for (int a = 1;; a = 0)
13 {
14 for (char *s = c; *s; ++s)
15 {
16 }
17 if (!a) break;
18 buf = (char *) bar (1);
19 }
20 return buf; // { dg-bogus "\\\[-Wmaybe-uninitialized" }
21 }