This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21087] [4.0 Regression] ICE in do_nonmember_using_decl
- From: "aoliva at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Apr 2005 02:47:07 -0000
- Subject: [Bug c++/21087] [4.0 Regression] ICE in do_nonmember_using_decl
- References: <20050418145002.21087.sstrasser@systemhaus-gruppe.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From aoliva at gcc dot gnu dot org 2005-04-23 02:47 -------
Subject: Re: [PR c++/21087] don't keep builtin anticipated decl, override it with actual declaration
On Apr 21, 2005, Mark Mitchell <mark@codesourcery.com> wrote:
> Alexandre Oliva wrote:
>> When push_overloaded_decl() was passed a new declaration that matches
>> a builtin decl, it would verify that the declarations matched and, if
>> so, leave the existing (built-in) declaration alone.
>> The intended behavior is to merge the built-in declaration with the
>> new declaration, into the location of the built-in declaration.
>> The problem is that duplicate_decl() doesn't perform such merging
>> when
>> the new declaration is a template decl, and then we end up with an
>> overload involving the template decl and the anticipated built-in
>> decl. However, overloads involving anticipated decls are something we
>> try to avoid, and actually check for elsewhere.
>> This patch fixes the code such that, if the existing decl is
>> anticipated and the two decls weren't merged, we discard the built-in
>> and use the new decl by itself.
>> Bootstrapped and regtested on amd64-linux-gnu. Ok to install?
> OK.
Ok for 4.0 branch as well? The same patch applies cleanly there, and
it's just completed bootstrap and regtesting on amd64-linux-gnu in the
branch as well.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21087