The following code now ICEs on the mainline: template <typename T> class srp; template <typename T> struct ptr { template <typename U> ptr(const srp<U> &other); }; template <typename T> struct srp { template <typename U> operator ptr<U>(void) const; }; ptr<int> parent_get() { srp<int> parent; return parent; }
Note we did reject this before even though it is invalid code. -- Summary: [4.1 Regression] ICE in more_specialized_fn, more than one user-defined conversion "srp<int>" to "ptr<int>" Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20723