]>
Commit | Line | Data |
---|---|---|
6481daa9 | 1 | // { dg-do assemble } |
921e5a0e | 2 | // PRMS Id: 5921 |
921e5a0e JL |
3 | // Bug: default arguments containing constructor calls persist incorrectly. |
4 | ||
5 | class foo | |
6 | { | |
7 | public: | |
8 | foo(); | |
9 | foo(int x); | |
10 | public: | |
11 | int iamamember; | |
12 | }; | |
13 | ||
14 | class bar | |
15 | { | |
16 | public: | |
17 | bar(); | |
7235a4d4 | 18 | int memberfunction(int i, const char *j, double k, foo foo1 = foo(0)); |
921e5a0e JL |
19 | }; |
20 | ||
21 | int | |
22 | pain(bar *bar1) | |
23 | { | |
24 | return bar1->memberfunction(1, "x", 0.0); | |
25 | } | |
26 | ||
27 | int | |
28 | pain2(bar *bar1) | |
29 | { | |
30 | return bar1->memberfunction(1, "x", 0.0); | |
31 | } |