This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50436] New: Crash or hang on invalid template code
- From: "zackw at panix dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Sep 2011 19:06:19 +0000
- Subject: [Bug c++/50436] New: Crash or hang on invalid template code
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: zackw@panix.com
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;
};