summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/default2.C
blob: f50ee2f151b9ced3892209f0ee83fdb4821feb87 (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
// PRMS Id: 5921
// Build don't link:
// 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, 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);
}