aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr112618.c
blob: 897e6a8ed2eb9cfae268cc20d5f17eb5491fb8db (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
/* { dg-do compile } */
/* { dg-options "-O2" } */

int m, *p;

__attribute__ ((simd)) int
bar (int x)
{
  if (x)
    {
      if (m < 1)
        for (m = 0; m < 1; ++m)
          ++x;
      p = &x;
      for (;;)
        ++m;
    }
  return 0;
}

__attribute__ ((simd)) int
foo (int x)
{
 bar (x);
 return 0;
}