summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-17.c
blob: 8a95f15c5ae6c19421abb9a5301061b1d46e4374 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-O -Wuninitialized" } */

typedef _Complex float C;
C foo(int cond)
{
  C f;
  __imag__ f = 0;
  if (cond)
    {
      __real__ f = 1;
      return f;
    }
  return f;	/* { dg-warning "may be used" "unconditional" } */
}