From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E49DD3858D32; Tue, 11 Apr 2023 13:33:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E49DD3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681220022; bh=mVfFHOJsrivkZXXsyPtEEUyFhQthFm0AG2razUiXQvo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=b1CTEf3DC890O7vHeIsIIlSon2giD8Optt5zlxplIL845XJJJ7qaI84CYL1BBCad9 DtC+wLp7jZDYnumu71aqPs9cpOk+hfEZGWhEMTIWL2GQugkb6/6Z6onwfqSIAh+whz pr3iU3DtCn3GbL4GpsWQrkq7dHhOoip17y3AO9fc= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109442] Dead local copy of std::vector not removed from function Date: Tue, 11 Apr 2023 13:33:42 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org 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: --- 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=3D109442 --- Comment #2 from Jonathan Wakely --- Neither v nor v1 escapes the function, so I don't think operator delete can inspect them. The destructor doesn't inspect the contents, it just destroys the elements (which is a no-op for int) and then calls operator delete to free the stora= ge.=