From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4F4853858C83; Sat, 10 Sep 2022 17:15:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F4853858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662830154; bh=527aFTdjQBXEw/vAXeq6nQyWc/8HjxpaJNwW8KHTGb8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ikWFpYnFlbqaqxEHv5w3nSOm+ByYm8jEkm6a9GryucQgBQvrlI2tv1pib98LDJaNt V/DZFoBOppzsOjvBKlZyqageKUBWZFk0SQK3ZJTGE3beP/3uRZTr54e2iYGWQrQcfY PNuVib6yUudLlFPWJac0RSpKDoe+cMF4hUE8/RQI= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106901] False positive -Warray-bounds with -O2 or higher? Date: Sat, 10 Sep 2022 17:15:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: 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=3D106901 --- Comment #1 from Andrew Pinski --- Maybe I am reading the code wrong. But size will be >=3D 5 at the loop. So it will be executed. If size is >=3D 5. And that is what the warning is = about.=