summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/pr46111.C
blob: df57d8d02d2efcfe42968dd8030a616daeae26eb (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 }
// { dg-require-effective-target pthread }
// { dg-options "-ftree-parallelize-loops=2 -g" }

struct A
{
  int zero ()
  {
    return 0;
  }
};

static inline void
bar (int)
{
}

struct B
{
  struct A a;
  B (int n)
  {
    for (int i = 0; i < n; i++)
      bar (a.zero ());
  }
};

void
foo (int n)
{
  struct B b (n);
}