diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2015-03-24 17:22:27 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2015-03-24 17:22:27 +0000 |
commit | e5bca5f62ed46cc290a5ed458ca808dafa8f9640 (patch) | |
tree | ac4ab07f2535aee54f5393e91d699c0c47ae9cc6 /gcc | |
parent | 88db3715f99bd6f4d3135e7a3a31b62def952269 (diff) | |
download | gcc-e5bca5f62ed46cc290a5ed458ca808dafa8f9640.zip gcc-e5bca5f62ed46cc290a5ed458ca808dafa8f9640.tar.gz gcc-e5bca5f62ed46cc290a5ed458ca808dafa8f9640.tar.bz2 |
re PR c++/58923 (g++ does not use provided conversion function for implicit conversion to another type)
2015-03-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58923
* g++.dg/other/virtual3.C: New.
From-SVN: r221640
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/other/virtual3.C | 25 |
2 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dadd843..4ec4386 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2015-03-24 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/58923 + * g++.dg/other/virtual3.C: New. + +2015-03-24 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/60130 * g++.dg/cpp0x/vt-60130.C: New. diff --git a/gcc/testsuite/g++.dg/other/virtual3.C b/gcc/testsuite/g++.dg/other/virtual3.C new file mode 100644 index 0000000..55c8185 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/virtual3.C @@ -0,0 +1,25 @@ +// PR c++/58923 + +struct A +{ + virtual void do_it() const = 0; +}; + +struct B : A +{ + virtual void do_it() const {} +}; + +struct C +{ + operator B() const { return B(); } +}; + +void do_it(const A& a) { a.do_it(); } + +int main() +{ + C c; + do_it(c); + return 0; +} |