summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ipa/pr80205.C
blob: 460bdcb02ca5c515c546a517e83086065254cd70 (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
33
34
// PR ipa/80205
// { dg-options "-fnon-call-exceptions --param early-inlining-insns=100 -O2" }

class a
{
public:
  virtual ~a ();
};
class b
{
public:
  template <typename c> b (c);
  ~b () { delete d; }
  void
  operator= (b e)
  {
    b (e).f (*this);
  }
  void
  f (b &e)
  {
    a g;
    d = e.d;
    e.d = &g;
  }
  a *d;
};
void
h ()
{
  b i = int();
  void j ();
  i = j;
}