aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/torture/pr60026.c
blob: 1cc5f55a4d22c4f29f530372472a413fef42cd30 (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
/* PR ipa/60026 */
/* { dg-do compile } */

struct S { int f; } a;

__attribute__((optimize (0)))
struct S foo (int x, struct S y)
{
  int b = y.f;
  return a; 
}

void
bar ()
{
  while (a.f)
    {
      struct S c = {0};
      foo (0, c);
    }
}

int
main ()
{
  bar (); 
  return 0;
}