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:07:30 +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
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.01.27 13:07:21
Ever Confirmed|0 |1
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-27 13:07:21 UTC ---
(In reply to comment #0)
> 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.
This ICE is caused by revision 159335:
http://gcc.gnu.org/ml/gcc-cvs/2010-05/msg00387.html