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/112285] `in` class parameter with `gdc -fpreview=in` causes ICE Date: Sun, 10 Mar 2024 18:07:30 +0000 [thread overview] Message-ID: <bug-112285-4-b3Q68OgfEC@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-112285-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112285 --- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>: https://gcc.gnu.org/g:a84b98c62d90bf9e8b01038f624a62725e6a44db commit r14-9420-ga84b98c62d90bf9e8b01038f624a62725e6a44db Author: Iain Buclaw <ibuclaw@gdcproject.org> Date: Sun Mar 10 17:49:06 2024 +0100 d: Fix -fpreview=in ICEs with forward referenced parameter [PR112285] The way that the target hook preferPassByRef is implemented, it relied on the GCC "back-end" tree type to determine whether or not to use `ref' ABI for D `in' parameters; e.g: prefer by value if it is expected that the target will pass the type around in registers. Building the GCC tree type depends on the AST type being complete - all semantic processing is finished - but as this hook is called from the front-end, this will not be the case for forward referenced or self-referencing types. The consensus in upstream is that `in' parameters should always be implicitly `ref', but as the front-end does not yet support all types being rvalue references, limit this just static arrays and structs. PR d/112285 PR d/112290 gcc/d/ChangeLog: * d-target.cc (Target::preferPassByRef): Return true for all static array and struct types. gcc/testsuite/ChangeLog: * gdc.dg/pr112285.d: New test. * gdc.dg/pr112290.d: New test.
next prev parent reply other threads:[~2024-03-10 18:07 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-10-30 7:49 [Bug d/112285] New: " gcc.gnu.org at webfreak dot org 2024-03-10 18:07 ` cvs-commit at gcc dot gnu.org [this message] 2024-03-10 18:53 ` [Bug d/112285] " cvs-commit at gcc dot gnu.org 2024-03-10 19:11 ` cvs-commit at gcc dot gnu.org 2024-03-10 19:14 ` ibuclaw at gdcproject dot 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-112285-4-b3Q68OgfEC@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: linkBe 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).