[Bug c++/12146] ICE in lookup_template_function at cp/pt.c:4005
gbeauchesne at mandrakesoft dot com
gcc-bugzilla@gcc.gnu.org
Wed Sep 3 07:30:00 GMT 2003
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();
}
More information about the Gcc-bugs
mailing list