Document gcov-io (PR gcov-profile/84735).
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-11.c
blob2730534e90e39819e81f7353d13c311ca6de66ca
1 /* Positive test for uninitialized variables. */
2 /* { dg-do compile } */
3 /* { dg-options "-O -Wuninitialized" } */
5 int sink;
7 void f1(int parm) /* { dg-bogus "uninitialized" "parameter" } */
9 sink = parm; /* { dg-bogus "uninitialized" "parameter" } */
12 void f2(void)
14 int x;
15 sink = x; /* { dg-warning "is used" "unconditional" } */
18 void f3(int p)
20 int x;
21 if (p)
22 x = p;
23 sink = x; /* { dg-warning "may be used" "conditional" } */
26 void f4(int p)
28 int x; /* { dg-bogus "uninitialized" "easy if" } */
29 if (p)
30 x = 1;
31 else
32 x = 2;
33 sink = x;
36 void f5(void)
38 int x, i; /* { dg-bogus "uninitialized" "easy loop" } */
39 for (i = 0; i < 10; ++i)
40 x = 1;
41 sink = x;