From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sourceware.org (Postfix) with ESMTPS id A8F083858C83 for ; Tue, 1 Feb 2022 21:44:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A8F083858C83 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=inria.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=inria.fr X-IronPort-AV: E=Sophos;i="5.88,335,1635199200"; d="scan'208";a="19180706" Received: from 85-171-189-19.rev.numericable.fr (HELO hippo) ([85.171.189.19]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2022 22:44:08 +0100 Date: Tue, 1 Feb 2022 22:44:07 +0100 (CET) From: Marc Glisse Reply-To: gcc mailing list To: Toon Moene cc: gcc mailing list Subject: Re: gcd_1.c:188:13: runtime error: shift exponent 64 is too large for 64-bit type 'long unsigned int' In-Reply-To: <5e40b118-5868-e5e6-999c-9955433d5d02@moene.org> Message-ID: References: <5e40b118-5868-e5e6-999c-9955433d5d02@moene.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Feb 2022 21:44:12 -0000 On Tue, 1 Feb 2022, Toon Moene wrote: > I just ran a "ubsan" build on my x86_64-linux-gnu system. > > See: https://gcc.gnu.org/pipermail/gcc-testresults/2022-February/754454.html > > This is an interesting failure: > > Executing on host: > /home/toon/scratch/bld1142336/gcc/testsuite/gfortran29/../../gfortran > -B/home/toon/scratch/bld1142336/gcc/testsuite/gfortran29/../../ > -B/home/toon/scratch/bld1142336/x86_64-pc-linux-gnu/./libgfortran/ > /home/toon/compilers/gcc/gcc/testsuite/gfortran.dg/graphite/pr39516.f > -fdiagnostics-plain-output -fdiagnostics-plain-output -O -O2 > -ftree-loop-linear -S -o pr39516.s (timeout = 300) > spawn -ignore SIGHUP > /home/toon/scratch/bld1142336/gcc/testsuite/gfortran29/../../gfortran > -B/home/toon/scratch/bld1142336/gcc/testsuite/gfortran29/../../ > -B/home/toon/scratch/bld1142336/x86_64-pc-linux-gnu/./libgfortran/ > /home/toon/compilers/gcc/gcc/testsuite/gfortran.dg/graphite/pr39516.f > -fdiagnostics-plain-output -fdiagnostics-plain-output -O -O2 > -ftree-loop-linear -S -o pr39516.s > gcd_1.c:188:13: runtime error: shift exponent 64 is too large for 64-bit type > 'long unsigned int' > FAIL: gfortran.dg/graphite/pr39516.f -O (test for excess errors) > Excess errors: > gcd_1.c:188:13: runtime error: shift exponent 64 is too large for 64-bit type > 'long unsigned int' > > Note that the test case is pure Fortran source. The undefined error seems to > come from a function inside the graphite library ... Maybe try with a more recent version of GMP first? gcd_1.c has only 103 lines in release 6.2.1. A stack trace (UBSAN_OPTIONS=print_stacktrace=1) would make it easier to guess where this is coming from. -- Marc Glisse