Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / auto-init-uninit-26.c
blobae97ecfa71e1368e5743688bbf316370307fbfa3
1 /* { dg-do compile } */
2 /* { dg-options "-O -Wmaybe-uninitialized -ftrivial-auto-var-init=zero" } */
4 extern unsigned bar (void);
5 extern void quux (void);
7 unsigned foo (unsigned v)
9 unsigned u;
10 if (v != 100)
11 u = bar ();
13 // Prevent the "dom" pass from changing the CFG layout based on the inference
14 // 'if (v != 100) is false then (v < 105) is true'. (Now it would have to
15 // duplicate the loop in order to do so, which is deemed expensive.)
16 for (int i = 0; i < 10; i++)
17 quux ();
19 if (v < 105) /* v == 100 falls into this range. */
20 return u; /* { dg-warning "may be used uninitialized" } */
22 return 0;