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 d/109108] d: Undefined reference to lambda in private enum
Date: Tue, 14 Mar 2023 19:11:47 +0000	[thread overview]
Message-ID: <bug-109108-4-EgSQCYWJQn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109108-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Iain Buclaw
<ibuclaw@gcc.gnu.org>:

https://gcc.gnu.org/g:0dcfd68b2a8369b647650bb68ff612cad3b33ac9

commit r12-9252-g0dcfd68b2a8369b647650bb68ff612cad3b33ac9
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Tue Mar 14 13:16:11 2023 +0100

    d: Fix undefined reference to lambda defined in private enum [PR109108]

    Previously lambdas were connected to the module they were defined in.
    Now they are emitted into every referencing compilation unit, and are
    given one-only linkage.

            PR d/109108

    gcc/d/ChangeLog:

            * decl.cc (function_defined_in_root_p): Remove.
            (get_symbol_decl): Set DECL_LAMBDA_FUNCTION_P on function literals.
            (start_function): Unconditionally unset DECL_EXTERNAL
            (set_linkage_for_decl): Give lambda functions one-only linkage.

    gcc/testsuite/ChangeLog:

            * gdc.dg/torture/imports/pr109108.d: New test.
            * gdc.dg/torture/pr109108.d: New test.

    (cherry picked from commit 423d34f61c43e400f0d5b837fe93c83963b2ecdd)

  parent reply	other threads:[~2023-03-14 19:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-12 14:52 [Bug d/109108] New: " ibuclaw at gcc dot gnu.org
2023-03-14 18:16 ` [Bug d/109108] " cvs-commit at gcc dot gnu.org
2023-03-14 19:11 ` cvs-commit at gcc dot gnu.org [this message]
2023-03-14 19:55 ` cvs-commit at gcc dot gnu.org
2023-03-14 20:18 ` ibuclaw 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-109108-4-EgSQCYWJQn@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).