Document gcov-io (PR gcov-profile/84735).
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-pred-2_c.c
blobbf094d12770c8099152b19f950702818fc52905e
1 /* { dg-do compile } */
2 /* { dg-options "-Wuninitialized -O2 -fno-tree-tail-merge" } */
4 int g;
5 void bar (void);
6 void blah (int);
8 int foo (int n, int m, int r)
10 int flag = 0;
11 int v;
13 if (n)
15 v = r;
16 flag = 1;
19 if (m) g++;
20 else bar();
22 if (flag)
23 blah(v); /* { dg-bogus "uninitialized" "bogus uninitialized var warning" } */
25 return 0;
28 int foo_2 (int n, int m, int r)
30 int flag = 0;
31 int v;
33 if (n)
35 v = r;
36 flag = 1;
39 if (m) g++;
40 else bar();
42 if (flag)
43 blah(v); /* { dg-bogus "uninitialized" "bogus uninitialized var warning" } */
44 else
45 blah(v); /* { dg-warning "uninitialized" "real uninitialized var warning" } */
47 return 0;