From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4FC703858C31; Mon, 10 Jul 2023 19:39:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4FC703858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689017987; bh=tTDSWesFcsozsRcStgO0fZ9yOlceyyJV/HSGOUnzRlA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SBD9LYlO+1IeSu1yx3p3/O/8rELjmP1hvrdENLVT6OmF8IdxL6+qTJHi8zNw4lNNn VNV8/QL4f2SqIG7gerJtzhJ2QOzE3AUE+cpYA3oGsOVqmkXob8wsTkWwtul0hZlE0A j4xJ+TKkMxSK95ksbJ75+NN60tyLDnDfhJFYbWOI= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110620] spurious array-bounds Date: Mon, 10 Jul 2023 19:39:47 +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: 12.1.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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=3D110620 --- Comment #5 from Andrew Pinski --- >From the looks of it is just not optimizing enough before the warning happe= ns. The final optimized code does not have the store in it. The store for the vector to create the size of one element vector happens a= nd then a copy loop happens and then loads from start/finish to figure out the size of the vector but that is not optimized until dom2 which is after vrp2 already ran ...=