Reproducer: struct __attribute__((abi_tag("A", "B"))) A { }; struct A18 { operator A() { return A(); } }; void f18_test() { A a = A18(); } Mangling for 'A18::operator A' is '_ZN3A18cv1AB1AB1BB1AB1Bev' pretty printed as ' A18::operator A[abi:A][abi:B][abi:A][abi:B]()' i.e. the same tags mentioned twice for the name. It seems that GCC adds implicit tags from the return type of the function but in all other cases they are added only if the tags are missing otherwise in the mangled name that is not the case in given example.
Author: jason Date: Tue Aug 9 16:55:08 2016 New Revision: 239299 URL: https://gcc.gnu.org/viewcvs?rev=239299&root=gcc&view=rev Log: PR c++/71712 - ABI tags on conversion ops. * class.c (check_abi_tags): Don't duplicate tags for conversion ops. Added: trunk/gcc/testsuite/g++.dg/abi/abi-tag22.C trunk/gcc/testsuite/g++.dg/abi/abi-tag22a.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/class.c trunk/gcc/cp/mangle.c
Fixed for GCC 7.