summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/default2.C
blob: 167ac635dbfac43091ac525d3edd8486f2c74ee9 (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
// { dg-do assemble  }
// PRMS Id: 5921
// Bug: default arguments containing constructor calls persist incorrectly.

class foo
{
 public:
  foo();
  foo(int x);
 public:
  int iamamember;
};

class bar
{
 public:
  bar();
  int memberfunction(int i, const char *j, double k, foo foo1 = foo(0));
};

int
pain(bar *bar1)
{
  return bar1->memberfunction(1, "x", 0.0);
}

int
pain2(bar *bar1)
{
  return bar1->memberfunction(1, "x", 0.0);
}