Created attachment 467596 [details] testcase Not sure if this is the right place for this bug report, I can't fill one on gcc's one because it is access-restricted. The attached test case compiles just fine with g++ 5.4, g++ 6.3 and clang 3.9 but embeds an invalid symbol name, "_ZSt7forwardIRZ4mainEUlRT_E_EOS0_RNSt16remove_referenceIS0_E4typeE", that nor c++-filt nor gdb can de demangle when compiled with GCC. Clang does not reproduce the issue. steps to reproduce: g++ -std=c++14 test-undemanglable.cpp gdb ./a.out # gdb core dump strings a.out | c++-filt # c++-filt segmentation error This is an issue because it makes gdb unusable if not used stand-alone (it is able to recover from it).
Small update to notify it stills happen with Gcc 7.1
Oh, and I forgot to mention that I only happens with an optimisation level of 0, and seems to be related to generic lambdas. The good news is that it does not seem to be gentoo specific, I can reproduce it on godbolt: https://godbolt.org/g/s94Ii6 (line 232 in assembly output).
Does it still happen o gcc-7? At least c++filt does something sensible for me: $ c++filt _ZSt7forwardIRZ4mainEUlRT_E_EOS0_RNSt16remove_referenceIS0_E4typeE main::{lambda(auto:1&)#1}& std::forward<main::{lambda(auto:1&)#1}&>(std::remove_reference<main::{lambda(auto:1&)#1}&>::type&)