view gcc/testsuite/gcc.dg/uninit-pr81897-2.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
line wrap: on
line source

/* { 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;
    }
}