From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 483D23858C5E; Mon, 22 Jan 2024 16:34:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 483D23858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705941245; bh=QEr0uxLz+tZt5rmfeGhYKjCDvPlPQBb8uejaZ+JRiUM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=d6mp45PUN5VCmSy45Ez7yboLeLodIG49LgSFm1/iVKYjwzJmCLtoSPH8al1CZWiHi eE1WUnrKl/YnuZgL9i3Cu8ms8TJRmNWMWa8dOv9+1GVK/BPXBh/3A2MAJWq8R2mTFG +WDCi8/2Aqvotcb/BfbrEZcf7yLwHtNxlAfS6k4s= From: "dimitry@unified-streaming.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113239] [13/14 regression] After 822a11a1e64, bogus -Warray-bounds warnings in std::vector Date: Mon, 22 Jan 2024 16:34:04 +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: 14.0 X-Bugzilla-Keywords: diagnostic, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: dimitry@unified-streaming.com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 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=3D113239 --- Comment #8 from Dimitry Andric --- (In reply to Frank Ch. Eigler from comment #7) > Wonder if this similar but different diagnostic is closely related: ... > where the c++ code in question is a straight >=20 > vector<> foo; > vector<> bar; > foo.insert(foo.end(), bar.begin(), bar.end()); I can't reproduce the warning here with a vector example, the function= is entirely optimized away too. But even if I return the result, e.g.: std::vector f(std::vector bar) { std::vector foo; foo.insert(foo.end(), bar.begin(), bar.end()); return foo; } still no warning. But I think you might need to reduce the mutatee.cxx case. That said, the warning you show is triggered in a different place, and the "between 9 and 9223372036854775800 bytes" is also different.=