From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 021FB3858C31; Wed, 3 May 2023 16:37:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 021FB3858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683131872; bh=7xh+DD+znVvdySrqRCq67mbdohlwBHO2XCzeCV1HfJ0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RvS/JACEcbs0ikFznAQ6xnFX1ELOmUgJ4e4+G5Loz19ykot3nKV+jj6TJX7ktOSux NsL4jjoMTf9nrQZm/WUVqy2PCD6M6yeZGlLnYlmEYUH0SpBvutpuhY1zLQzKEfmxq4 e10rJdrU1gujDcwSLEAdflACRkasriZAAIejYaLQ= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109717] -Warray-bound error with gnu++20 and fmt library Date: Wed, 03 May 2023 16:37:51 +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.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi 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=3D109717 --- Comment #2 from Jonathan Wakely --- It's not actually broken, it's just paranoid, and the overflow detection triggers for dead code. The optimizer analyzes different paths through the code separately, and fai= ls to detect that some of those paths are unreachable, and then warns that they would overflow if those paths were taken.=