From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24104 invoked by alias); 6 May 2014 10:51:08 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24052 invoked by uid 48); 6 May 2014 10:51:05 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/56888] memcpy implementation optimized as a call to memcpy Date: Tue, 06 May 2014 10:51:00 -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: 4.8.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg00351.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888 --- Comment #29 from Richard Biener --- (In reply to Rich Felker from comment #28) > On Tue, Apr 29, 2014 at 02:16:38PM +0000, rguenth at gcc dot gnu.org wrote: > > Honza, is there a more "fancy" way of doing this? > > The only correct way to fix this is to honor -ffreestanding and never > generate references to hosted-C functions (which include memset) when > -ffreestanding is used. Done that for 4.8+ now (bah, forgot to reference the PR in the changelog so the commits don't appear here). But I still like to fix the obvious wrong cases in some way.