From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E4D033858418; Fri, 19 Jan 2024 09:02:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E4D033858418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705654952; bh=O0PqoEsQdyantkDCcC+1m0sYRLBf8QhrBdszKfMGTzI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hYfyN2QuGroKlPyx9JRT1bbH8MDETpqUc3hhHi2jDCtrG6A8OvQxJ1VRE+SGNZ3Qk +BqMxvLnAknfolEC15KUmwREmwtwGmat1PYe/gPWHKKFkpiFbx125x1EKFWKIwfl2b pDwsxGhsxM46xH5YnNu8jc5srlAGbJYcAJvrpfT0= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113463] ICE: in extended_tree, at tree.h:6449 with _BitInt() used as offset Date: Fri, 19 Jan 2024 09:02:32 +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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub 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=3D113463 --- Comment #2 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:df1cd90e32bb17d34f5fdce99bd0377fe1b8e5c6 commit r14-8277-gdf1cd90e32bb17d34f5fdce99bd0377fe1b8e5c6 Author: Jakub Jelinek Date: Fri Jan 19 10:00:51 2024 +0100 gimple-ssa-warn-restrict: Only use type range from NOP_EXPR for non-narrowing conversions [PR113463] builtin_memref::extend_offset_range when it sees a NOP_EXPR from INTEGRAL_TYPE (to INTEGRAL_TYPE of sizetype/ptrdifftype precision given the callers) uses wi::to_offset on TYPE_{MIN,MAX}_VALUE of the rhs1 type. This ICEs with large BITINT_TYPEs - to_offset is only supported for precisions up to the offset_int precision - but it even doesn't make any sense to do such thing for narrowing conversions, their range means the whole sizetype/ptrdifftype range and so the normal handling done later on (largest sized supported objec= t) is the way to go in that case. So, the following patch just restrict this to non-narrowing conversions. 2024-01-19 Jakub Jelinek PR tree-optimization/113463 * gimple-ssa-warn-restrict.cc (builtin_memref::extend_offset_range): Only look through NOP_EXPRs if rhs1 doesn't have wider type than lhs. * gcc.dg/bitint-74.c: New test.=