This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/67337] [4.9/5/6 Regression] Segmentation fault on a template class
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 24 Aug 2015 09:36:44 +0000
- Subject: [Bug c++/67337] [4.9/5/6 Regression] Segmentation fault on a template class
- Auto-submitted: auto-generated
- References: <bug-67337-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67337
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-08-24
CC| |trippels at gcc dot gnu.org
Summary|Segmentation fault on a |[4.9/5/6 Regression]
|template class |Segmentation fault on a
| |template class
Ever confirmed|0 |1
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
markus@x4 tmp % cat UserTableSync.ii
template <class> class A
{
void m_fn1 (int *, int);
};
template <class> class B
{
public:
typedef int Type;
};
template <class> class C
{
public:
C (int);
template <template <class> class T> void m_fn2 (typename T<void>::Type);
};
template <>
void
A<int>::m_fn1 (int *, int)
{
C<int> a (0);
a.m_fn2<B> (0);
}
markus@x4 tmp % g++ -c UserTableSync.ii
UserTableSync.ii: In instantiation of âvoid C< <template-parameter-1-1>
>::m_fn2(typename T<void>::Type) [with T = B; <template-parameter-1-1> = int]â:
UserTableSync.ii:16:44: internal compiler error: Segmentation fault
template <template <class> class T> void m_fn2 (typename T<void>::Type);
^
0xc7b7df crash_signal
../../gcc/gcc/toplev.c:352
0x7fb2417d470f ???
/var/tmp/glibc/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x7a970e write_template_prefix
../../gcc/gcc/cp/mangle.c:1152
0x7a9277 write_prefix
../../gcc/gcc/cp/mangle.c:1067
0x7a9bd5 write_nested_name
../../gcc/gcc/cp/mangle.c:998
0x7a5aa7 write_type
../../gcc/gcc/cp/mangle.c:2010
0x7a7c34 write_method_parms
../../gcc/gcc/cp/mangle.c:2591
0x7a7fe0 write_bare_function_type
../../gcc/gcc/cp/mangle.c:2533
0x7aa239 mangle_decl_string
../../gcc/gcc/cp/mangle.c:3500
0x7aa499 get_mangled_id
../../gcc/gcc/cp/mangle.c:3522
0x7aa499 mangle_decl(tree_node*)
../../gcc/gcc/cp/mangle.c:3589
0xeef7d0 decl_assembler_name(tree_node*)
../../gcc/gcc/tree.c:658
0x8eceac symbol_table::insert_to_assembler_name_hash(symtab_node*, bool)
../../gcc/gcc/symtab.c:157
0x8ee70c symbol_table::symtab_initialize_asm_name_hash()
../../gcc/gcc/symtab.c:249
0x9043d2 analyze_functions
../../gcc/gcc/cgraphunit.c:1175
0x9044d0 symbol_table::finalize_compilation_unit()
../../gcc/gcc/cgraphunit.c:2477
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.