From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7C07D385842B; Thu, 23 Feb 2023 23:29:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C07D385842B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677194965; bh=WqXRuTSho3RVN1Wgogge5StrqTtg60uFvY7BsAx2vCg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=krNjHiy7E6dxOmavRQFsNUPWsCptIj5VyNmMfioLVjP5+vj+nelpyFbXPJs+A4v70 czJkRQUhLzj/CW4KQwqERRN+TlAPUNBkha2Gzql0svpLmvroWqNMmc6rUR9Rks999h chEBwK3z7IIeoNZKKoIa6SyG/eODx7PEuW1vQBek= From: "iains 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 23:29:25 +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: iains 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 #14 from Iain Sandoe --- (In reply to ibuclaw from comment #13) > Confirmed, D is doing NRVO return whereas C++ isn't. I am not sure that the NVRO is the issue (it is correct ABI for an 8 byte struct to be returned in EAX:EDX). The value can be "created" in the return slot (i.e. doing the NVRO) without altering that. ------ If the caller is passing two regs it seems to me likely that (for some reas= on it thinks that the value is returned via an sret pointer). The callee then get s the set pointer in the register it is expecting *this= to be in... and boom .. we are broken at some point, So it would seem that we might want to find a reproducer that we can look at the various tree dumps and see if/where an sret is introduced? (if that's not the cause, then we'll have to find a new hypothesis)=