From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 10BD13858023; Thu, 23 Feb 2023 10:50:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10BD13858023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677149423; bh=tfnlkIp/o1O1TxWU3wzBZVsW/nJSkUox6QYknpGwIO4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nk7NJo1I6qo9+ykWYpuB8BI2l4znGh9KsiqwVKYIdpz0aboHZS4GeHYh46+bxRdLp Xid73uVdtbr09n81Ebl/zUo5y+YnuNj4RFbK3zeGE+lVqh61muEhIpXi+rixzVcT/J qw17RdF6dA+oEVnheLxXDZB/+Iqo3Esax0MOVJLo= From: "ibuclaw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug d/106977] [13 regression] d21 dies with SIGBUS on 32-bit Darwin Date: Thu, 23 Feb 2023 10:50:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: d X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ibuclaw at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: ibuclaw at gdcproject dot org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106977 --- Comment #10 from ibuclaw at gcc dot gnu.org --- Without using `->visible()` would be something like: --- a/gcc/d/decl.cc +++ b/gcc/d/decl.cc @@ -2559,10 +2561,17 @@ set_linkage_for_decl (tree decl) void set_visibility_for_decl (tree node, Dsymbol *sym) { - Visibility visibility =3D sym->visible (); - if (visibility.kind =3D=3D Visibility::private_) + Visibility::Kind kind; + if (AggregateDeclaration *ad =3D sym->isAggregateDeclaration ()) + kind =3D ad->visibility.kind; + else if (Declaration *d =3D sym->isDeclaration ()) + kind =3D d->visibility.kind; + else + gcc_unreachable (); + + if (kind =3D=3D Visibility::private_) TREE_PRIVATE (node) =3D 1; - else if (visibility.kind =3D=3D Visibility::protected_) + else if (kind =3D=3D Visibility::protected_) TREE_PROTECTED (node) =3D 1; /* If the declaration was declared `export', append either the dllimport=