aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-pr89296.c
blob: 9d81b32b9792586878eaf6e24ecfc65ea89fad9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-O2 -Wuninitialized" } */

int get_a_value ();
void printk(const char *);
void test_func()
{
    int loop;
    while (!loop) {             /* { dg-warning "is used uninitialized" } */
	loop = get_a_value();
	printk("...");
    }
}