This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/50436] New: Crash or hang on invalid template code


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;
};


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]