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++/104040] linker: when exported template class from module is used in several .cpp with same tpl arg ~ undefined reference to not default non-inline destructor
Date: Wed, 10 Apr 2024 01:40:54 +0000	[thread overview]
Message-ID: <bug-104040-4-U8pSbwO4Lj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104040-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathaniel Shead <nshead@gcc.gnu.org>:

https://gcc.gnu.org/g:0774240b4df9a9bc48ce33a9625788e402498f5a

commit r14-9883-g0774240b4df9a9bc48ce33a9625788e402498f5a
Author: Nathaniel Shead <nathanieloshead@gmail.com>
Date:   Fri Mar 29 13:53:54 2024 +1100

    c++: Keep DECL_SAVED_TREE of cdtor instantiations in modules [PR104040]

    A template instantiation still needs to have its DECL_SAVED_TREE so that
    its definition is emitted into the CMI. This way it can be emitted in
    the object file of any importers that use it, in case it doesn't end up
    getting emitted in this TU.

    This is true even for maybe-in-charge functions, because we don't
    currently stream the clones directly but instead regenerate them from
    this function.

            PR c++/104040

    gcc/cp/ChangeLog:

            * semantics.cc (expand_or_defer_fn_1): Keep DECL_SAVED_TREE for
            all vague linkage cdtors with modules.

    gcc/testsuite/ChangeLog:

            * g++.dg/modules/pr104040_a.C: New test.
            * g++.dg/modules/pr104040_b.C: New test.

    Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
    Reviewed-by: Jason Merrill <jason@redhat.com>

  reply	other threads:[~2024-04-10  1:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-15  5:34 [Bug c++/104040] New: " sm0ke999 at yandex dot ru
2024-04-10  1:40 ` cvs-commit at gcc dot gnu.org [this message]
2024-04-10  1:51 ` [Bug c++/104040] " nshead 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-104040-4-U8pSbwO4Lj@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).