OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [gomp/] [pr31769.C] - Blame information for rev 715

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR tree-optimization/31769
2
// { dg-options "-O2 -fopenmp" }
3
// { dg-do compile }
4
 
5
struct B
6
{
7
  B () {}
8
  virtual ~B () {}
9
};
10
struct C
11
{
12
  C (int x, int y) {}
13
};
14
template
15
struct D
16
{
17
  D () {}
18
  ~D () {}
19
};
20
struct E
21
{
22
  E () {}
23
  ~E () {}
24
  D e;
25
};
26
struct A
27
{
28
  B *b;
29
  A () { b = __null; }
30
  ~A () { if (b != __null) delete b; }
31
};
32
struct F : public A
33
{
34
  explicit F (int x) { foo (0); }
35
  F (const F &x) {}
36
  F (F &x, C y) {}
37
  F operator () (C x) const
38
  {
39
    return F (const_cast(*this), x);
40
  }
41
  template  F & operator+= (const U &);
42
  void foo (int);
43
  E f;
44
};
45
 
46
int
47
main ()
48
{
49
  try
50
  {
51
    F f (10);
52
    F g (10);
53
    C h (0, 9);
54
#pragma omp parallel for
55
    for (int i = 0; i < 2; ++i)
56
      g += f (h);
57
  }
58
  catch (int &e)
59
  {
60
  }
61
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.