[Bug debug/93951] [8/9/10 Regression] ICE with '-flto -g -femit-struct-debug-baseonly'
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 2 10:54:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93951
--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
There's a reduced test-case:
$ cat pr93951.ii
# 2 "" 3
namespace std {
template <typename _Tp> struct A {};
template <typename, typename _Visitor> struct __gen_vtable {
using _Func_ptr = _Visitor;
using _Array_type = A<_Func_ptr>;
static _Array_type m_fn1() {}
static constexpr auto _S_vtable = m_fn1;
};
template <typename _Visitor> visit(_Visitor) {
using _Result_type = decltype(0);
__gen_vtable<_Result_type, _Visitor>::_S_vtable;
}
} // namespace std
struct V {
m_fn2() {
auto visitor = [] {};
std::visit(visitor);
}
};
Fails with:
$ g++ pr93951.ii -c -g -flto -femit-struct-debug-baseonly -std=c++17
-fno-eliminate-unused-debug-symbols -c
Will you take a look Richi?
More information about the Gcc-bugs
mailing list