From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 351143858D35; Mon, 8 May 2023 07:12:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 351143858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683529979; bh=Jwl+tgJp7GDhkBlAUjP8W9NV6z/UETVrRONsIDH1h+c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lPfgLG4hIVzRx2QQHX59gsAiJjxJVxVMT/AlTceCGYQ1nGpjaYrx6aqSf9zBcOJpI 41E4tdcaC6Ieh4ZPghq2/990efIBMo2ElDcXJp2Ue3Tt2V13VI7ds/Dc6zgIkOEBl8 8l+Aj/AC4VsHcSpQDRvjBAbv/PQMVBZQi6WaBbso= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109759] UBSAN error: shift exponent 64 is too large for 64-bit type 'long unsigned int' Date: Mon, 08 May 2023 07:12:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109759 --- Comment #1 from Richard Biener --- Odd, the code is explicitely guarded: inline wi::hwi_with_prec::hwi_with_prec (HOST_WIDE_INT v, unsigned int p, signop s) : precision (p), sgn (s) { if (precision < HOST_BITS_PER_WIDE_INT) val =3D sext_hwi (v, precision); and in sext_hwi as well.=