https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121239
Bug ID: 121239 Summary: mangling of non-dependent calls and operators that resolve to an overload Product: gcc Version: 16.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ppalka at gcc dot gnu.org Target Milestone: --- In https://gcc.gnu.org/pipermail/gcc-patches/2025-July/690520.html we noticed the following inadvertent mangling changes of non-dependent calls/operators: For f<int> in: struct A { }; A operator+(A,A); template<class T> decltype(T(),A()+A()) f(); int main() { f<int>(); } GCC 5 mangles it as decltype (((int)()),(((A)())+((A)()))) f<int>() GCC 6+ mangles it as decltype (((int)()),((operator+)((A)(), (A)()))) f<int>() (since r6-5772) Clang mangles it the same as GCC 5 For h<int> in: template<class T> void g(T); template<class T> decltype(T(),g(0)) h(); int main() { h<int>(); } GCC 11 mangles it as decltype (((int)()),(g(0))) h<int>() GCC 12+ mangles it as decltype (((int)()),(g<int>(0))) h<int>() (since r12-6075) Clang mangles it the same as GCC 12