From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 93F2E385E017; Wed, 5 Oct 2022 11:49:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93F2E385E017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664970570; bh=//3aG53R5EguLMCPVj21WkbYChQnPxUF/GekirRkyJI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hYn5eMuhhd/b4JHcUNRyxDDpUeFpdTZPrvA/tiOD6ObluOMnJhDwXZkH1IHEvYnz7 0ERw5X9zF5r7hSHa++9Resd+HwblAnn98xHj0cumvsQfoFU9+RsCIwzYyIGicpIkWD T5nho12Z8heGQAuEdnm9WlJGz1mMS9dk0IVd/2dQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106698] bogus -Wstringop-overflow warning on Ada code with LTO Date: Wed, 05 Oct 2022 11:49:29 +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: 11.2.0 X-Bugzilla-Keywords: diagnostic 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: ebotcazou 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=3D106698 --- Comment #3 from CVS Commits --- The master branch has been updated by Eric Botcazou : https://gcc.gnu.org/g:853ce8eea4ff97850a987167e603387b3d0f1401 commit r13-3084-g853ce8eea4ff97850a987167e603387b3d0f1401 Author: Eric Botcazou Date: Wed Oct 5 12:21:03 2022 +0200 Fix bogus -Wstringop-overflow warning in Ada It comes from a discrepancy between get_offset_range, which uses a sign= ed type, and handle_array_ref, which uses an unsigned one, to do computati= ons. gcc/ PR tree-optimization/106698 * pointer-query.cc (handle_array_ref): Fix handling of low boun= d. gcc/testsuite/ * gnat.dg/lto26.adb: New test. * gnat.dg/lto26_pkg1.ads, gnat.dg/lto26_pkg1.adb: New helper. * gnat.dg/lto26_pkg2.ads, gnat.dg/lto26_pkg2.adb: Likewise.=