From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 997133858C66; Wed, 28 Jun 2023 18:52:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 997133858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687978375; bh=xN48nE1Lp00xTRjrHDy7sGrdkKQ4tb9PlfJx2fa64E4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lk5ClGvVhjSiVti5x58z/PhcaN5jtl2undw3IldlSC/YdzgjRbmQ55b2aYNIU8adE Jxv60jRno2BNQvy3juJwoCpcfpJ17RAlaiYNpiQyStCp+78qTu3FSijHAN4pAiY0+b 8j1U8IHbJWtplsBGJj7Ni70i+L9vKfMrn2ONlE64= 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:52:55 +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 #33 from CVS Commits --- The releases/gcc-13 branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:f2eeda5652438fe783d4e3878139481a1b8606b6 commit r13-7496-gf2eeda5652438fe783d4e3878139481a1b8606b6 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. (cherry picked from commit c201cd3be0d9ab887fafb0c33a9fc287c405c21c)=