Since GCC 4.0.0 the following valid code snippet causes an ICE when
compiled with "--param ggc-min-expand=0 --param ggc-min-heapsize=0":
===========================
template<int> void foo()
{
struct A
{
A() { }
};
}
template void foo<0>();
===========================
The error message is:
bug.cc: In function 'void foo()':
bug.cc:6: internal compiler error: tree check: expected statement_list, have
dl_expr in finish_compound_stmt, at cp/semantics.c:1140
Please submit a full bug report, [etc.]
--
Summary: [4.0/4.1 regression] ICE with struct in template
function
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, monitored
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23562