aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/torture/pr60895.C
blob: 0edd36ada163a716c91aa704fafa94c3490c8181 (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
// { dg-do compile }

struct C
{
  double elems[3];
};

C
foo ()
{
  C a;
  double *f = a.elems;
  int b;
  for (; b;)
    {
      *f = 0;
      ++f;
    }
  return a;
}

struct J
{
  C c;
  __attribute__((always_inline)) J () : c (foo ()) {}
};

void
bar ()
{
  J ();
}