[Bug c++/20723] New: [4.1 Regression] ICE in more_specialized_fn, more than one user-defined conversion "srp<int>" to "ptr<int>"

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Apr 1 22:54:00 GMT 2005


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



More information about the Gcc-bugs mailing list