From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125396 invoked by alias); 18 Oct 2019 13:07:38 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 125388 invoked by uid 89); 18 Oct 2019 13:07:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Oct 2019 13:07:37 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x9ID7Z0l002273; Fri, 18 Oct 2019 08:07:35 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x9ID7Yeg002270; Fri, 18 Oct 2019 08:07:34 -0500 Date: Fri, 18 Oct 2019 13:07:00 -0000 From: Segher Boessenkool To: Josef Wolf , gcc-help@gcc.gnu.org Subject: Re: Crash when cross compiling for ARM with GCC-8-2-0 and -ftree-loop-distribute-patterns Message-ID: <20191018130734.GN28442@gate.crashing.org> References: <20191016131759.GA11171@raven.inka.de> <5b75d9aa-9f33-2ec6-ff46-713b113b3539@gmail.com> <20191017113157.GC11171@raven.inka.de> <20191017140423.GD11171@raven.inka.de> <20191018085314.GE11171@raven.inka.de> <20191018120737.GH11171@raven.inka.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191018120737.GH11171@raven.inka.de> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2019-10/txt/msg00082.txt.bz2 On Fri, Oct 18, 2019 at 02:07:37PM +0200, Josef Wolf wrote: > But Umm... Honestly, this solution looks pretty wired to me. > > When the compiler decides to replace code by a call to some function, > shouldn't it make sure not to replace _all_ occurences of such code (and thus > the final implementation of it) also? That would be ideal of course, but how can the compiler know? > > This is just one of those gotchas that you have to be aware of when > > implementing the standard library. > > I am not implementing the standard library. I am just trying to get rid of > it. I need just a couple of functions from the stdlib, and I was happy with > simple/lightwight re-implementations of those functions for decades. memset is a reserved name. If you use it you are implementing part of the standard library (except when using -ffreestanding, but GCC has an exception there). Segher