From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 01CCC386F44E; Tue, 21 Apr 2020 17:13:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 01CCC386F44E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587489217; bh=CticCOIVnQG/KzHJBKUobM2OOm5yONiVP8tER82wq84=; h=From:To:Subject:Date:In-Reply-To:References:From; b=n3xSsAjV6PsBEzFk9bVKvfB2TxLI7wWUztq/3QQYquzQ3NhK3KIwuHJLWJdRwgTS4 9eXW61PqyNFeTNxnDFYqUxm5jD2X79BEJdGRl8Qjebh50774Cp2RNlE0RLHlyNdtKV RquJ4THBm0DePmr7S7WpFv54mtuRVITpEeyL8G1Y= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/94647] [10 Regression] bogus -Warray-bounds on strncpy into a larger member array from a smaller array Date: Tue, 21 Apr 2020 17:13:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: diagnostic, patch 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: msebor at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.0 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 17:13:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94647 --- Comment #5 from CVS Commits --- The master branch has been updated by Martin Sebor : https://gcc.gnu.org/g:3942060c4b3168307b9e2870d81e7ca15b49760a commit r10-7854-g3942060c4b3168307b9e2870d81e7ca15b49760a Author: Martin Sebor Date: Tue Apr 21 10:59:24 2020 -0600 PR middle-end/94647 - bogus -Warray-bounds on strncpy into a larger mem= ber array from a smaller array gcc/ChangeLog: PR middle-end/94647 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Correct the computation of the lower bound of the source access size. (builtin_access::generic_overlap): Remove a hack for setting ra= nges of overlap offsets. gcc/testsuite/ChangeLog: PR middle-end/94647 * c-c++-common/Warray-bounds-2.c: Adjust a test case and add a = new one. * c-c++-common/Warray-bounds-3.c: Add tests for missing warning= s. * c-c++-common/Wrestrict.c: Invert bounds in printed ranges. * gcc.dg/Warray-bounds-59.c: New test. * gcc.dg/Wrestrict-10.c: Add a missing warning. * gcc.dg/Wrestrict-5.c: Adjust text of expected warning. * gcc.dg/Wrestrict-6.c: Expect to see a range of overlap offset= s.=