From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92320 invoked by alias); 15 Dec 2019 19:21:19 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 92311 invoked by uid 89); 15 Dec 2019 19:21:19 -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=H*f:oL8Vy, H*i:oL8Vy, H*i:sk:g@mail., H*i:cbRQwT89 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; Sun, 15 Dec 2019 19:21:16 +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 xBFJLEPJ012596; Sun, 15 Dec 2019 13:21:15 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id xBFJLDGh012591; Sun, 15 Dec 2019 13:21:13 -0600 Date: Sun, 15 Dec 2019 19:21:00 -0000 From: Segher Boessenkool To: Ian Lance Taylor Cc: GCC Development Subject: Re: Errors building libgcc for powerpc64le-linux-gnu Message-ID: <20191215192113.GZ3152@gate.crashing.org> References: <20191215072457.GY3152@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2019-12/txt/msg00212.txt.bz2 On Sun, Dec 15, 2019 at 09:43:20AM -0800, Ian Lance Taylor wrote: > On Sat, Dec 14, 2019 at 11:25 PM Segher Boessenkool > wrote: > > > > On Sat, Dec 14, 2019 at 10:51:50AM -0800, Ian Lance Taylor via gcc wrote: > > > I'm seeing compiler crashes building libgcc for powerpc64le-linux-gnu, > > > cross-compiling from x86_64-pc-linux-gnu. I'm at SVN revision 279830. > > > I'm seeing the following. Is anybody else seeing this crash? Thanks. > > > > No, and that makes me wonder what is going on. The error is simple enough > > of course, as you note in a later message; but why do we not see it on > > every other build? > > I think it's because clang treats a left shift by a negative number as > undefined behavior but GCC does not. So GCC is consistently producing > some number, and clang is producing different numbers. Hrm. Why did that not show up with ubsan then though? (Or maybe it did, and I just never heard). > I should note that I don't really understand what purpose that > constant is serving anyhow. - "operands[2] = GEN_INT (1 << (75 - REGNO (operands[0])));") + "operands[2] = GEN_INT (1 << (7 - (REGNO (operands[0]) - CR0_REGNO)));") The constant is the bitmask of which CR fields to save/restore (always one here, but the insn allows any combination). Committing that patch later today. Thanks for the report! Segher