[Bug c++/78761] New: C++14, compiler generate mangled name that can not be demangled
chihin.ko at oracle dot com
gcc-bugzilla@gcc.gnu.org
Sat Dec 10 04:46:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78761
Bug ID: 78761
Summary: C++14, compiler generate mangled name that can not be
demangled
Product: gcc
Version: 6.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: chihin.ko at oracle dot com
Target Milestone: ---
cat t.cc
template <class T>
decltype(auto) g_1(T t) {
return t;
}
template <class T>
auto g_2(T t) {
return t;
}
int main() {
decltype(auto) res = g_1<int>(10);
decltype(auto) res2 = g_2<int>(10);
return 0;
}
==========================================
g++ -g t.cc
> nm a.out | grep g_2
[71] | 4198535| 12|FUNC |WEAK |0 |20 |_Z3g_2IiEDaT_
> /pkg/gnu/bin/gnu-c++filt _Z3g_2IiEDaT_
auto g_2<int>(int) <=== this is OK
> nm a.out | grep g_1
[84] | 4198523| 12|FUNC |WEAK |0 |19 |_Z3g_1IiEDcT_
> /pkg/gnu/bin/gnu-c++filt _Z3g_1IiEDcT_
_Z3g_1IiEDcT_ <=== can not be demangled
More information about the Gcc-bugs
mailing list