aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr106938.c
blob: 7365a8c29fbae072fbe80a67a3a8a5fd8048591a (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
36
/* { dg-do compile } */
/* { dg-options "-O1 -fno-ipa-pure-const -fno-tree-ccp -Wuninitialized" } */

int n;

void
undefined (void);

__attribute__ ((returns_twice)) int
zero (void)
{
  return 0;
}

void
bar (int)
{
  int i;

  for (i = 0; i < -1; ++i)
    n = 0;
}

__attribute__ ((simd)) void
foo (void)
{
  int uninitialized;

  undefined ();

  while (uninitialized < 1) /* { dg-warning "uninitialized" } */
    {
      bar (zero ());
      ++uninitialized;
    }
}