http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54929
Bug #: 54929
Summary: internal compiler error: in tsubst_copy, at
cp/pt.c:12349
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
Input:
template<class T> class A {void F(){sizeof(double);}};
template class A<int>;
Expected result: compile successfully.
Output:
prog.cpp: In instantiation of ‘void A<T>::F() [with T = int]’:
prog.cpp:2:16: required from here
prog.cpp:1:43: internal compiler error: in tsubst_copy, at cp/pt.c:12349
template<class T> class A {void F(){sizeof(double);}};
^
0x5835ca tsubst_copy
../../s-4.8/gcc/cp/pt.c:12349
0x57364e tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../s-4.8/gcc/cp/pt.c:13476
0x573543 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../s-4.8/gcc/cp/pt.c:13501
0x57aeba tsubst_expr
../../s-4.8/gcc/cp/pt.c:13156
0x57c8c8 tsubst_expr
../../s-4.8/gcc/cp/pt.c:12641
0x57c465 tsubst_expr
../../s-4.8/gcc/cp/pt.c:12811
0x579d86 instantiate_decl(tree_node*, int, bool)
../../s-4.8/gcc/cp/pt.c:18633
0x5b43a3 instantiate_pending_templates(int)
../../s-4.8/gcc/cp/pt.c:18732
0x5efc00 cp_write_global_declarations()
../../s-4.8/gcc/cp/decl2.c:3993
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.
Output from g++ -v:
Using built-in specs.
COLLECT_GCC=/new-gcc/i-4.8/bin/g++
COLLECT_LTO_WRAPPER=/new-gcc/i-4.8/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../s-4.8/configure --prefix=/new-gcc/i-4.8
Thread model: posix
gcc version 4.8.0 20121014 (experimental) (GCC)
Sorry if this bugs gets duplicated; I cannot find the original.