http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50436
Bug #: 50436
Summary: Crash or hang on invalid template code
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
This (invalid) test case causes gcc 4.6.1 to crash (segmentation fault).
Variations cause it to go into an infinite loop instead. I tripped over the
infinite loop while delta-minimizing a much, much larger test case for an
unrelated problem.
template <bool> struct VI {};
template <typename T>
struct IP
{
static const bool r = IP<T>::r;
};
template <typename T> struct V
{
VI<IP<T>::r> vi;
};
struct X;
struct Y
{
V<X> v;
};