https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87109
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Author: mpolacek Date: Thu Sep 20 23:20:19 2018 New Revision: 264452 URL: https://gcc.gnu.org/viewcvs?rev=264452&root=gcc&view=rev Log: 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. Added: trunk/gcc/testsuite/g++.dg/cpp0x/ref-qual20.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/call.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/cpp0x/ref-qual19.C