From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1E472385696B; Thu, 20 Jul 2023 07:23:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E472385696B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689837829; bh=x/9koGARcHTYcKsediOzjApwwP2pGqJKgmbk/6Q5npk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OLOPJ6WCt+hfG/UNK96LPGraamGDH4OIe+dZ63w2Uwn36ZcpUrIsIWCUM78wihBC+ Mbx4SbPDZNuxb42YpSiGUzEK3UIzuJg5v3OVxBDZ95KRyNdEb/swzoU5K6q8tw+JTJ n2WpKQ5AT2Ivr5qGXyrpQ/uXAlTumM+5RP71/URE= From: "bernie at codewiz dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/105438] [11/12/13/14 Regression] Incorrect array-bounds warning with array size carried over from a previous template instantiation since r11-4987-g602c6cfc79ce4ae6 Date: Thu, 20 Jul 2023 07:23:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 13.1.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: bernie at codewiz dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: version target_milestone 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=3D105438 Bernie Innocenti changed: What |Removed |Added ---------------------------------------------------------------------------- Version|11.3.0 |13.1.1 Target Milestone|11.5 |13.2 --- Comment #13 from Bernie Innocenti --- Still present on g++ 13.1.1 I discovered that -O2 is required to trigger this bug. These compile without warnings: g++ -O1 -Warray-bounds repro.cc g++ -O3 -Warray-bounds repro.cc g++ -Ofast -Warray-bounds repro.cc=