From: jason Date: Wed, 7 Aug 2013 01:17:36 +0000 (+0000) Subject: PR c++/57825 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=20df84a7e74cda0d2289c283c4f8657be4b4181f;p=thirdparty%2Fgcc.git PR c++/57825 * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201550 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f85fd3f1b32c..5083f7016ccc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2013-08-06 Jason Merrill + + PR c++/57825 + * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier. + 2013-08-05 Paolo Carlini PR c++/58080 diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index f8b4bbce8221..63ec7fa72663 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1236,6 +1236,8 @@ strip_typedefs (tree t) result = build_method_type_directly (class_type, type, TREE_CHAIN (arg_types)); + result + = build_ref_qualified_type (result, type_memfn_rqual (t)); } else { diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual14.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual14.C new file mode 100644 index 000000000000..8e55551aeb2f --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual14.C @@ -0,0 +1,18 @@ +// PR c++/57825 +// { dg-do compile { target c++11 } } + +template +struct target_class +{}; + +template +struct target_class +{}; + +template +struct target_class +{}; + +template +struct target_class +{};