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/108842] Cannot use enum array with -fno-druntime Date: Fri, 07 Jul 2023 20:00:32 +0000 [thread overview] Message-ID: <bug-108842-4-NSZwUcMg11@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108842-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108842 --- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>: https://gcc.gnu.org/g:eef069fe8b22229509a783c9ecb2eb659df4f5ab commit r11-10898-geef069fe8b22229509a783c9ecb2eb659df4f5ab Author: Iain Buclaw <ibuclaw@gdcproject.org> Date: Fri Jul 7 21:06:07 2023 +0200 d: Fix PR 108842: Cannot use enum array with -fno-druntime Restrict the generating of CONST_DECLs for D manifest constants to just scalars without pointers. It shouldn't happen that a reference to a manifest constant has not been expanded within a function body during codegen, but it has been found to occur in older versions of the D front-end (PR98277), so if the decl of a non-scalar constant is requested, just return its initializer as an expression. PR d/108842 gcc/d/ChangeLog: * decl.cc (DeclVisitor::visit (VarDeclaration *)): Only emit scalar manifest constants. (get_symbol_decl): Don't generate CONST_DECL for non-scalar manifest constants. * imports.cc (ImportVisitor::visit (VarDeclaration *)): New method. gcc/testsuite/ChangeLog: * gdc.dg/pr98277.d: Add more tests. * gdc.dg/pr108842.d: New test. (cherry picked from commit f934c5753849f7c48c6a3abfcd73b8f6008e8371)
next prev parent reply other threads:[~2023-07-07 20:00 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-18 7:34 [Bug d/108842] New: " zach-gcc at cs dot stanford.edu 2023-07-07 19:21 ` [Bug d/108842] " cvs-commit at gcc dot gnu.org 2023-07-07 19:22 ` cvs-commit at gcc dot gnu.org 2023-07-07 19:25 ` cvs-commit at gcc dot gnu.org 2023-07-07 20:00 ` cvs-commit at gcc dot gnu.org [this message] 2023-07-07 20:01 ` 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-108842-4-NSZwUcMg11@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).