blob: b5495366c5bc20aefdea8e6251fd30f48abf4a98 [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-O2 -Wuninitialized -fno-ivopts" } */
inline int foo(int x)
{
return x;
}
static void bar(int a, int *ptr)
{
do
{
int b;
if (b < 40) {
ptr[0] = b;
}
b += 1; /* { dg-warning "is used uninitialized" } */
ptr++;
}
while (--a != 0);
}
void foobar(int a, int *ptr)
{
bar(foo(a), ptr);
}