summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-pr81897-2.c
blob: 644de655225d9d72acd6d58aff379eb4f1a5373e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* { dg-do compile }  */
/* { dg-options "-O1 -fno-tree-ccp -fno-tree-dse -Wmaybe-uninitialized" } */

int oo;

void
pc (int *tt)
{
  int cf = 0;

  if (*tt != 0)
    {
      if (0)
        {
          int *qg;
          int uj = 0;

 t6:
          tt = &cf;
          if (oo != 0)
            {
              ++uj; /* { dg-warning "may be used uninit" } */
              *qg = !!oo && !!uj; /* { dg-warning "may be used uninit" } */
            }
        }
      cf = 0;
      goto t6;
    }

  if (oo != 0)
    {
      *tt = 1;
      goto t6;
    }
}