PR c++/87109 - wrong ctor with maybe-rvalue semantics.
authorMarek Polacek <polacek@redhat.com>
Thu, 20 Sep 2018 23:20:19 +0000 (23:20 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 20 Sep 2018 23:20:19 +0000 (23:20 +0000)
commit17b20aa993c78aa77c9c87cd6d6b90186f4d7c42
tree87096e6587e4e5c1116736373a57567b9d624638
parent0b7fb27b698da38fd13108ecc914613f85f66f9d
PR c++/87109 - wrong ctor with maybe-rvalue semantics.

* call.c (build_user_type_conversion_1): Refine the maybe-rvalue
check to only return if we're converting the return value to a base
class.

* g++.dg/cpp0x/ref-qual19.C: Adjust the expected results.
* g++.dg/cpp0x/ref-qual20.C: New test.

From-SVN: r264452
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/ref-qual19.C
gcc/testsuite/g++.dg/cpp0x/ref-qual20.C [new file with mode: 0644]