From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from pio-pvt-msa1.bahnhof.se (pio-pvt-msa1.bahnhof.se [79.136.2.40]) by sourceware.org (Postfix) with ESMTPS id 34F49384243D for ; Wed, 13 Jan 2021 19:53:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 34F49384243D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nocrew.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=noring@nocrew.org Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa1.bahnhof.se (Postfix) with ESMTP id 696AB3F5AB; Wed, 13 Jan 2021 20:53:15 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at bahnhof.se X-Spam-Score: -1.901 X-Spam-Level: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=no autolearn_force=no version=3.4.2 Received: from pio-pvt-msa1.bahnhof.se ([127.0.0.1]) by localhost (pio-pvt-msa1.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ghM8ar2vxq6N; Wed, 13 Jan 2021 20:53:14 +0100 (CET) Received: by pio-pvt-msa1.bahnhof.se (Postfix) with ESMTPA id 615CC3F59B; Wed, 13 Jan 2021 20:53:14 +0100 (CET) Date: Wed, 13 Jan 2021 20:53:13 +0100 From: Fredrik Noring To: Segher Boessenkool Cc: Alexander Monakov , gcc-help@gcc.gnu.org Subject: Re: m68k: Simple loop compiles into boundless recursion with -O2 Message-ID: References: <20210113192015.GT30983@gate.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210113192015.GT30983@gate.crashing.org> X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 19:53:22 -0000 Hi Segher, > Yup, always always always use -dr :-) Noted! > You probably want -ffreestanding anyway for your situation: -nostdlib > does not mean "there is no standard library", it just means "do not link > with it". Ah, yes. > For the archives, no one has said it yet: to just disable the > optimisation transforming the loop into a memset, you can use > -fno-tree-loop-distribute-patterns . It's a new 32-bit libc (for Atari TOS), and maximum GCC optimisations are welcome, although I haven't yet figured out exactly where the boundary is between the GCC built-ins and this libc implementation. There is obviously some overlap between the two, and I wouldn't want the libc to stand in the way of GCC's optimisations. Other than that things work quite well so far, compiling programs, etc. It was surprisingly simple and straight-forward, but then of course this vintage 1985 operating system isn't complicated either. :) [ The name TOS/libc is provisional, it will be renamed to Fuji/libc shortly. ] Fredrik