public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/91706] [9/10/11/12 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in equate_type_number_to_die, at dwarf2out.c:5782
Date: Tue, 08 Jun 2021 13:24:31 +0000	[thread overview]
Message-ID: <bug-91706-4-zwZuYnXBNN@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-91706-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91706

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:46c1a9f6d03ab444b42c41067597e3fbfba38486

commit r11-8524-g46c1a9f6d03ab444b42c41067597e3fbfba38486
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Apr 16 11:13:40 2021 -0400

    c++: alias with same name as base fn [PR91706]

    This is a bit complex.  Looking up c<T> in the definition of D::c finds
    C::c, OK.  Looking up c in the definition of E finds D::c, OK.  Since the
    alias is not dependent, we strip it from the template argument, leaving

    using E = A<decltype(c<T>())>;

    where 'c' still refers to C::c.  But instantiating E looks up 'c' again and
    finds D::c, which isn't a function, and sadness ensues.

    I think the bug here is looking up 'c' in D at instantiation time; the
    declaration we found before is not dependent.  This seems to happen because
    baselink_for_fns gets BASELINK_BINFO wrong; it is supposed to be the base
    where lookup found the functions, C in this case.

    gcc/cp/ChangeLog:

            PR c++/91706
            * semantics.c (baselink_for_fns): Fix BASELINK_BINFO.

    gcc/testsuite/ChangeLog:

            PR c++/91706
            * g++.dg/template/lookup17.C: New test.

  parent reply	other threads:[~2021-06-08 13:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-91706-4@http.gcc.gnu.org/bugzilla/>
2020-04-24 14:56 ` [Bug c++/91706] [8/9/10 " ppalka at gcc dot gnu.org
2021-04-16 14:12 ` [Bug c++/91706] [8/9/10/11 " jason at gcc dot gnu.org
2021-04-16 16:07 ` jason at gcc dot gnu.org
2021-04-20  4:40 ` jason at gcc dot gnu.org
2021-05-14  9:52 ` [Bug c++/91706] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:15 ` rguenth at gcc dot gnu.org
2021-06-08  3:56 ` cvs-commit at gcc dot gnu.org
2021-06-08  3:56 ` cvs-commit at gcc dot gnu.org
2021-06-08 13:24 ` cvs-commit at gcc dot gnu.org [this message]
2021-06-08 21:20 ` [Bug c++/91706] [9/10 " jason at gcc dot gnu.org
2021-06-16 21:29 ` cvs-commit at gcc dot gnu.org
2022-05-13 20:11 ` jason at gcc dot gnu.org
2022-05-27  9:41 ` [Bug c++/91706] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:38 ` jakub at gcc dot gnu.org
2023-07-07  8:34 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-91706-4-zwZuYnXBNN@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).