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++/106890] [10/11/12 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071
Date: Tue, 18 Apr 2023 20:46:28 +0000	[thread overview]
Message-ID: <bug-106890-4-f4VKLYf5oN@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106890-4@http.gcc.gnu.org/bugzilla/>

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

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

https://gcc.gnu.org/g:94569d91bd4c604da755b4aae84256e7fe21196a

commit r12-9441-g94569d91bd4c604da755b4aae84256e7fe21196a
Author: Jason Merrill <jason@redhat.com>
Date:   Sat Mar 18 08:27:26 2023 -0400

    c++: DMI in template with virtual base [PR106890]

    When parsing a default member init we just build a CONVERT_EXPR for
    converting to a virtual base, and then expand that into the more complex
    form when we actually use the DMI in a constructor.  But that wasn't
working
    for the template case where we are considering the conversion at the point
    that the constructor needs the DMI instantiation, so it seemed like we were
    in a constructor already.  And then when the other constructor tries to
    reuse the instantiation, it sees uses of the first constructor's
parameters,
    and dies.  So ensure that we get the CONVERT_EXPR in this case, too.

            PR c++/106890

    gcc/cp/ChangeLog:

            * init.cc (maybe_instantiate_nsdmi_init): Don't leave
            current_function_decl set to a constructor.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/nsdmi-template25.C: New test.

  parent reply	other threads:[~2023-04-18 20:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08 10:06 [Bug c++/106890] New: virtual inheritance triggers compiler error when instatiating derived class with in-class initialization thomas at thomaslabs dot org
2022-09-08 10:12 ` [Bug c++/106890] [10/11/12/13 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071 marxin at gcc dot gnu.org
2022-09-08 10:49 ` rguenth at gcc dot gnu.org
2022-10-19  5:55 ` rguenth at gcc dot gnu.org
2023-03-17 23:16 ` jason at gcc dot gnu.org
2023-03-21 15:09 ` cvs-commit at gcc dot gnu.org
2023-04-18 20:46 ` cvs-commit at gcc dot gnu.org [this message]
2023-07-07 10:43 ` [Bug c++/106890] [11 " rguenth at gcc dot gnu.org
2023-08-11 21:21 ` cvs-commit at gcc dot gnu.org
2023-09-11 22:11 ` cvs-commit at gcc dot gnu.org
2023-09-11 22:11 ` jason 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-106890-4-f4VKLYf5oN@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).