diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/init/ctor5.C')
-rw-r--r-- | gcc/testsuite/g++.dg/init/ctor5.C | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/init/ctor5.C b/gcc/testsuite/g++.dg/init/ctor5.C new file mode 100644 index 000000000..cc9331882 --- /dev/null +++ b/gcc/testsuite/g++.dg/init/ctor5.C @@ -0,0 +1,17 @@ +// PR C++/21645 +// We were crashing because we forgot to update the type for +// the cloned argument for the cloned ctor. + +struct color { + ~color(); +}; +struct style { + color col; + style (color); +}; + +style::style(color c) + : col(c) +{ +} + |