https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81197
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Sat Dec 16 00:40:14 2017 New Revision: 255735 URL: https://gcc.gnu.org/viewcvs?rev=255735&root=gcc&view=rev Log: Backported from mainline 2017-12-15 Jakub Jelinek <ja...@redhat.com> PR c++/81197 * cp-tree.h (cp_maybe_mangle_decomp): Declare. * decl.c (cp_maybe_mangle_decomp): New function. (cp_finish_decomp): Don't SET_DECL_ASSEMBLER_NAME here. * parser.c (cp_convert_range_for, cp_parser_decomposition_declaration): Call cp_maybe_mangle_decomp. * pt.c (tsubst_expr): Likewise. * mangle.c (find_decomp_unqualified_name): New function. (write_unqualified_name): Handle DECL_DECOMPOSITION_P where DECL_ASSEMBLER_NAME is already set. * g++.dg/cpp1z/decomp34.C: New test. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp1z/decomp34.C Modified: branches/gcc-7-branch/gcc/cp/ChangeLog branches/gcc-7-branch/gcc/cp/cp-tree.h branches/gcc-7-branch/gcc/cp/decl.c branches/gcc-7-branch/gcc/cp/mangle.c branches/gcc-7-branch/gcc/cp/parser.c branches/gcc-7-branch/gcc/cp/pt.c branches/gcc-7-branch/gcc/testsuite/ChangeLog