public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ibuclaw at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug d/108877] Explicit immutable struct import internal compiler error Date: Sun, 26 Feb 2023 00:17:55 +0000 [thread overview] Message-ID: <bug-108877-4-r7jciQZuHK@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108877-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108877 ibuclaw at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ibuclaw at gcc dot gnu.org --- Comment #1 from ibuclaw at gcc dot gnu.org --- Immutable is the keyword here. Stub debug symbols are only attached to the main variant of a type. I think this would also be reproducible with `immutable class` and `immutable enum` as well. Have fix really to commit and backport once I test it. --- diff --git a/gcc/d/imports.cc b/gcc/d/imports.cc index 3b46d1b7560..2efef4ed54f 100644 --- a/gcc/d/imports.cc +++ b/gcc/d/imports.cc @@ -106,12 +106,16 @@ public: tree type = build_ctype (d->type); /* Not all kinds of D enums create a TYPE_DECL. */ if (TREE_CODE (type) == ENUMERAL_TYPE) - this->result_ = this->make_import (TYPE_STUB_DECL (type)); + { + type = TYPE_MAIN_VARIANT (type); + this->result_ = this->make_import (TYPE_STUB_DECL (type)); + } } void visit (AggregateDeclaration *d) final override { tree type = build_ctype (d->type); + type = TYPE_MAIN_VARIANT (type); this->result_ = this->make_import (TYPE_STUB_DECL (type)); } @@ -119,6 +123,7 @@ public: { /* Want the RECORD_TYPE, not POINTER_TYPE. */ tree type = TREE_TYPE (build_ctype (d->type)); + type = TYPE_MAIN_VARIANT (type); this->result_ = this->make_import (TYPE_STUB_DECL (type)); }
next prev parent reply other threads:[~2023-02-26 0:18 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-21 20:04 [Bug d/108877] New: " belka at caraus dot de 2023-02-26 0:17 ` ibuclaw at gcc dot gnu.org [this message] 2023-02-27 12:39 ` [Bug d/108877] " belka at caraus dot de 2023-03-03 0:26 ` cvs-commit at gcc dot gnu.org 2023-03-03 2:28 ` cvs-commit at gcc dot gnu.org 2023-03-03 2:33 ` cvs-commit at gcc dot gnu.org 2023-03-03 2:43 ` cvs-commit at gcc dot gnu.org 2023-03-03 2:46 ` 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-108877-4-r7jciQZuHK@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).