https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62207
Bug ID: 62207
Summary: ICE: tree check: expected tree that contains 'decl
minimal' structure, have 'overload' in tsubst_copy, at
cp/pt.c
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Keywords: error-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: glisse at gcc dot gnu.org
The following invalid file (found while reducing a different ICE) prints
several errors and ends with:
file.cpp:16:3: internal compiler error: tree check: expected tree that contains
'decl minimal' structure, have 'overload' in tsubst_copy, at cp/pt.c:12846
ptr
^
0xe314e4 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
/data/repos/gcc/pristine/gcc/tree.c:9321
0x62a998 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
/data/repos/gcc/pristine/gcc/tree.h:2843
0x62a998 tsubst_copy
/data/repos/gcc/pristine/gcc/cp/pt.c:12846
0x630ee9 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/data/repos/gcc/pristine/gcc/cp/pt.c:15420
0x612f93 tsubst_expr
/data/repos/gcc/pristine/gcc/cp/pt.c:14239
0x613391 tsubst_expr
/data/repos/gcc/pristine/gcc/cp/pt.c:13665
0x6128a3 tsubst_expr
/data/repos/gcc/pristine/gcc/cp/pt.c:13651
0x613533 tsubst_expr
/data/repos/gcc/pristine/gcc/cp/pt.c:13837
0x61104e instantiate_decl(tree_node*, int, bool)
/data/repos/gcc/pristine/gcc/cp/pt.c:20176
0x6569e4 instantiate_pending_templates(int)
/data/repos/gcc/pristine/gcc/cp/pt.c:20292
0x69352d cp_write_global_declarations()
/data/repos/gcc/pristine/gcc/cp/decl2.c:4355
class A {
virtual create() const
} class PostModNothing class AllocatorNew;
template <0> void ptr();
template <class, class, class, class> class AbstractFactoryStd : A {
create() const
} template <class, class> abstractFactoryStd() {
new AbstractFactoryStd<int, int, PostModNothing, AllocatorNew>
}
template <class T_itfc, class T_impl, class T_PostMod, class T_Allocator>
typename a
: obj_ptr_t
AbstractFactoryStd<T_itfc, T_impl, T_PostMod, T_Allocator>::create()
const const const {
typename T_Allocator : ptr_t ptr;
ptr
}
enableMueLuTpetra() {
typedef int Base;
typedef int Impl;
Teuchos:
abstractFactoryStd<Base, Impl>