[Bug c++/46831] New: Crash when it tries to do an invalid ICS with a conversion function template

schaub-johannes at web dot de gcc-bugzilla@gcc.gnu.org
Tue Dec 7 03:21:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46831

           Summary: Crash when it tries to do an invalid ICS with a
                    conversion function template
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: schaub-johannes@web.de


GCC crashes on this

struct B { }; 
struct D : B { }; 

struct A { 
  // [C++0x] default template argument for function template
  template<typename T = void> 
  operator D&(); 
}; 

void f(B&);

int main() {
  f(A());
}

This code clearly ill-formed by 13.3.3.1.2[over.ics.user] paragraph 3 . C.f.
13.3.3.1.4[ocer.ics.ref] paragraph 1.



More information about the Gcc-bugs mailing list