This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12146] ICE in lookup_template_function at cp/pt.c:4005
- From: "gbeauchesne at mandrakesoft dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2003 07:30:40 -0000
- Subject: [Bug c++/12146] ICE in lookup_template_function at cp/pt.c:4005
- References: <20030902233254.12146.wjl@icecavern.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12146
------- Additional Comments From gbeauchesne at mandrakesoft dot com 2003-09-03 07:30 -------
Subject: Re: ICE in lookup_template_function at cp/pt.c:4005
On Wed, 2 Sep 2003, wjl at icecavern dot net wrote:
> Created an attachment (id=4689)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4689&action=view)
> --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4689&action=view)
> This is the preprocessed source that makes it ICE.
Here is a simplified testcase:
// { dg-do compile }
// PR c++/12146: Incorrect template specialization of non-template function.
struct A { };
struct B { };
A f(const B & b) {
return A();
}
template<>
B f(const A & a) { // { dg-error "not match" }
return B();
}