http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51402
Bug #: 51402
Summary: [4.6/4.7 Regression] ICE with invalid template
parameter
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
The following invalid code snippet triggers an ICE since GCC 4.6.0:
=====================================
template<void> struct A
{
template<int,int> struct B {};
template<int N> struct B<N,N> {};
};
=====================================
bug.cc:1:10: error: 'void' is not a valid type for a template non-type
parameter
bug.cc:4:33: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in template_class_depth, at cp/pt.c:365
Please submit a full bug report, [etc.]