From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 734443858CDA; Thu, 13 Apr 2023 13:00:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 734443858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681390825; bh=UGwRkFfyXEkgzpxcoovsjfmRde2Ht6aTp4JL3RV9scI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Yocbg29pwCdK7TzHNrQ7z8/SUgFVf9AlZ5rlRZYCTktourOI3xulIq5qBsqbp56QT bnelw0z21OFgV3fb+vfMkqmCZfiWr9RQ9mfybcL5GMsH2toCzGoSdctfXhcbIqo6gt sy0BaQo8U2rFE0IZTjyOAbmPf/dTy44+ES4LX3YI= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/109495] Stack is used (unexpectedly) for copying on-heap objects (no problem in clang) Date: Thu, 13 Apr 2023 13:00:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D109495 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #6 from Jakub Jelinek --- The private keyword makes it non-POD and so the tail padding can be reused = and we need to make sure we copy only the bits except for type padding. I guess we need some archeology why the exact conditions are in there.=