From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 737D83858408; Wed, 28 Jun 2023 18:19:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 737D83858408 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687976399; bh=WxGvgVoGtZjLw/HnuM9d533/34eP4ywtz4q0eoOTOVI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yD4Z9Xo5rnccNkkMj04Ydzjrh7oXLWDue1EaJQix+XKQydf6Mg7A+0sZC5qugroQz HyMDiwqD0svKVMGMhHH5Kb5ve9ZitT/8ReZ1BXTlUqRj6/zG7at+bl515sGZCJn5Au fCy0D3OLKImmISfA0T4VqZjy6eOVMWrqjwVZ5CR4= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug d/106977] [13/14 regression] d21 dies with SIGBUS on 32-bit Darwin Date: Wed, 28 Jun 2023 18:19:57 +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: cvs-commit 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.2 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 #32 from CVS Commits --- The master branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:c201cd3be0d9ab887fafb0c33a9fc287c405c21c commit r14-2169-gc201cd3be0d9ab887fafb0c33a9fc287c405c21c Author: Iain Buclaw Date: Wed Jun 28 18:30:31 2023 +0200 d: Fix wrong code-gen when returning structs by value. Since r13-1104, structs have have compute_record_mode called too early on them, causing them to return differently depending on the order that types are generated in, and whether there are forward references. This patch moves the call to compute_record_mode into its own function, and calls it after all fields have been given a size. PR d/106977 PR target/110406 gcc/d/ChangeLog: * types.cc (finish_aggregate_mode): New function. (finish_incomplete_fields): Call finish_aggregate_mode. (finish_aggregate_type): Replace call to compute_record_mode wi= th finish_aggregate_mode. gcc/testsuite/ChangeLog: * gdc.dg/torture/pr110406.d: New test.=