https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87513
--- Comment #13 from Jason Merrill <jason at gcc dot gnu.org> --- Author: jason Date: Fri Mar 8 18:21:02 2019 New Revision: 269502 URL: https://gcc.gnu.org/viewcvs?rev=269502&root=gcc&view=rev Log: PR c++/87513 - 'sorry' mangling PMF template-id. Here build_offset_ref calls build_qualified_name to make a SCOPE_REF because the dependent template arguments make type_dependent_expression_p (member) true. We could probably work hard to prevent this, but it doesn't seem necessary, and it's easy to fix write_expression to handle the result. * mangle.c (write_expression): Handle SCOPE_REF to BASELINK. Added: branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp0x/decltype-tid1.C Modified: branches/gcc-8-branch/gcc/cp/ChangeLog branches/gcc-8-branch/gcc/cp/mangle.c