From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EF2C33858D32; Thu, 13 Apr 2023 11:49:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF2C33858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681386551; bh=h6tuHxEfedY/irGlVpvngzwb9JK6780U0310qJhKiVs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Bz6QQJH6ZfDEkQAvBtxO9zwmGGOimv20G3THfpGIV0V1djIQvdQyJ45v+EAAgeAVo m70at8qcx/++zTsU2s2lQj31F130sKLNOcVxf6gf7PiRBeyIdXnGqLSio8829UlujI wZW7r2GTg4Gwrl3Ogmt1HLQMcqmqotDVi6zlAyNo= From: "rguenth 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 11:49:11 +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: rguenth 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: keywords cf_known_to_fail version cc cf_gcctarget cf_reconfirmed_on bug_status component everconfirmed 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 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Known to fail| |13.0, 7.5.0 Version|unknown |13.0 CC| |hubicka at gcc dot gnu.org, | |rguenth at gcc dot gnu.org Target| |x86_64-*-* Last reconfirmed| |2023-04-13 Status|UNCONFIRMED |NEW Component|c++ |middle-end Ever confirmed|0 |1 --- Comment #2 from Richard Biener --- Selected stringop expansion strategy: libcall Selected stringop expansion strategy: libcall Selected stringop expansion strategy: libcall Selected stringop expansion strategy: libcall ;; MEM[(struct Child *)_6].D.35468 =3D MEM[(const struct Child &)_3].D.3546= 8; and for some reason we expand this to a memcpy to a stack temporary and then a memcpy from that stack temporary!?=