This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/46831] [4.6 Regression][C++0x] Crash when it tries to do an invalid ICS with a conversion function template
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 27 Jan 2011 13:10:14 +0000
- Subject: [Bug c++/46831] [4.6 Regression][C++0x] Crash when it tries to do an invalid ICS with a conversion function template
- Auto-submitted: auto-generated
- References: <bug-46831-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46831
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-27 13:09:52 UTC ---
(In reply to comment #1)
>
> --------------------------------------------------
> We can make this to crash on valid code, too:
> --------
>
> struct B { };
> struct D : B { };
> struct A {
> template<typename T = void> operator D&();
> operator long();
> };
>
> void f(long);
> void f(B&);
>
> int main() { f(A()); }
This ICE is also caused by revision 159335:
http://gcc.gnu.org/ml/gcc-cvs/2010-05/msg00387.html