From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DCC61385AC2A; Mon, 17 Oct 2022 13:28:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCC61385AC2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666013281; bh=GtkLsJy9h91RppyhShcU31m0BZB4thUbKU5aagy7ZsY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=x8pRsDfMqZGIqj8AU5KPbhB9rbbG0W8GdvbcN1cJcpDQwaUcck+MhZS2XsIOfqE1D 33j1snS8lFxoMNCmR4I9Sf8I3uSwm/BnxPFMOvhdJ787j/6GByDvGh+BTosWRyBbTd gXa8MkzlX51spyJ9U1j4RKGi02L9+Mbs7Dt6hYXE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106189] [10/11 Regression] ICE: Floating point exception since r9-1948-gd893b683f40884cd Date: Mon, 17 Oct 2022 13:28:01 +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: 13.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: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 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=3D106189 --- Comment #6 from CVS Commits --- The releases/gcc-11 branch has been updated by Richard Biener : https://gcc.gnu.org/g:9124675d2771aaf573bfbbe237ab28030bf3115d commit r11-10316-g9124675d2771aaf573bfbbe237ab28030bf3115d Author: Richard Biener Date: Mon Jul 25 17:24:57 2022 +0200 tree-optimization/106189 - avoid division by zero exception The diagnostic code can end up with zero sized array elements with T[][0] and the wide-int code nicely avoids exceptions when dividing by zero in one codepath but not in another. The following fixes the exception by using wide-int in both paths. PR tree-optimization/106189 * gimple-array-bounds.cc (array_bounds_checker::check_mem_ref): Divide using offset_ints. * gcc.dg/pr106189.c: New testcase. (cherry picked from commit bb04f9f23ac0dee2c003118c85372ece50a52220)=