This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ICE in pop_binding (regression against 2.95.x)
- To: Jakub Jelinek <jakub at redhat dot com>
- Subject: Re: [PATCH] Fix ICE in pop_binding (regression against 2.95.x)
- From: Nathan Sidwell <nathan at acm dot org>
- Date: Fri, 08 Jun 2001 13:43:47 +0100
- CC: jason at redhat dot com, mmitchell at codesourcery dot com, gcc-patches at gcc dot gnu dot org
- References: <20010608140558.R1253@sunsite.ms.mff.cuni.cz>
- Reply-To: nathan at compsci dot bristol dot ac dot uk
Jakub Jelinek wrote:
> The following testcase ICEs in pop_binding.
> The issue is that the foo method is inserted into class_shadowed list, but
> as there is a friend with the same name which comes after it, at pop_binding
> time when all class_shadowed bindings are poped up the foo method is not
> BINDING_VALUE() in the innermost IDENTIFIER_BINDING (but in TREE_CHAIN() of
> it). Exchanging the two foo lines in the testcase causes it to work, since
> foo method comes last and thus is in the innermost IDENTIFIER_BINDING.
> The following patch seems to fix it, bootstrap pending.
> Ok to commit if it is succeeds (and no regressions)?
this is bug 2929 right? I'm trying to commit a patch right now, but some
router from here to gcc.gnu.org is very ill.
Anyway, I don't think your solution is correct. The problem is that
the template class specialization has a template parameter binding layer
between the class binding layer and the enclosing namespace layer. The
friend decl gets put in the wrong binding contour. My fix is to
do_friend
to DTRT.
BTW. I nearly always assign bugs to me when I start working on them.
nathan
--
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
Never hand someone a gun unless you are sure where they will point it
nathan@acm.org http://www.cs.bris.ac.uk/~nathan/ nathan@cs.bris.ac.uk