From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 82C953858D33; Thu, 13 Apr 2023 12:59:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 82C953858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681390794; bh=UEsIPlD2nU5A9rNGH/Yl8XhePduDBm9nFRlOPj+NSpY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=c0wdwPHlUZubVQgL4Fj4emR2nHFTwJya0kt2IJC6hFOwfR6Fky0RbI8ta4UTqXE6b gMgkHZ0OYrz75jKQlu3YGS37Dy7pETnnNeo9COig30eH0XlsfTIHALJL5W05tpS5Di wLbJNozV/JqPO60qpS2ZB5/SHpVTlt8N1XmZXK3k= 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 12:59:54 +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: 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 --- Comment #5 from Richard Biener --- That said, the comment says padding that shouldn't be clobbered. In the future we could replace the TREE_ADDRESSABLE check with a check that get_base_address needs to live in memory. */ but maybe testing for BLKmode is enough here. So && ((mode !=3D BLKmode && !TREE_ADDRESSABLE (TREE_TYPE (exp)))=