diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-21 20:50:45 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-21 20:50:45 +0000 |
commit | ee8f324bdef2a501438ffa655fdda944b7c07ce3 (patch) | |
tree | d1c5107042dee7795f8c4d6735e86e94315b20b6 /gcc/cp/decl2.c | |
parent | bcce7ce721f8d6d9148e98fe7df233c598104dea (diff) | |
download | gcc-ee8f324bdef2a501438ffa655fdda944b7c07ce3.tar.gz |
cp/
PR c++/60943
* decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
testsuite/
* g++.dg/cpp1y/pr60943.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223502 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 27bacabb847..f1b3d0cbc6a 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -195,6 +195,8 @@ change_return_type (tree new_ret, tree fntype) else newtype = build_method_type_directly (class_of_this_parm (fntype), new_ret, TREE_CHAIN (args)); + if (FUNCTION_REF_QUALIFIED (fntype)) + newtype = build_ref_qualified_type (newtype, type_memfn_rqual (fntype)); if (raises) newtype = build_exception_variant (newtype, raises); if (attrs) |