[Bug c++/46831] [4.6 Regression][C++0x] Crash when it tries to do an invalid ICS with a conversion function template

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Jan 27 13:42:00 GMT 2011


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



More information about the Gcc-bugs mailing list