This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Fix ICE in pop_binding (regression against 2.95.x)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]