From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 481B7385842C; Tue, 6 Jun 2023 08:31:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 481B7385842C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686040274; bh=5b9WJjYGzUOsnBt5yiNpBNCS8zUcxpmCaVUQ2kaOiN0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hUGFAKIkKzHmAket0nWWoCBjuf7GHmb+Q3JhPLk7pYV07d9afv5BKlckK1y67H/qv 3i07Q1UO4jc7okdrPcdBXwgZczFly9Ke7qLSc6Ke1SbapWTo7/oGwUImNvZBpkwAGJ DZE/8Z1iYxzt/9hv7BQ0NlQo67rl2zZ/Uy02JMIs= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/110055] Dangling pointer warning inside std::vector on RISC-V Date: Tue, 06 Jun 2023 08:30:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.1.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth 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=3D110055 --- Comment #9 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:84eec2916fa68cd2e2b3a2cf764f2ba595cce843 commit r14-1562-g84eec2916fa68cd2e2b3a2cf764f2ba595cce843 Author: Richard Biener Date: Mon Jun 5 08:56:53 2023 +0200 middle-end/110055 - avoid CLOBBERing static variables The gimplifier can elide initialized constant automatic variables to static storage in which case TARGET_EXPR gimplification needs to avoid emitting a CLOBBER for them since their lifetime is no longer limited. Failing to do so causes spurious dangling-pointer diagnostics on the added testcase for some targets. PR middle-end/110055 * gimplify.cc (gimplify_target_expr): Do not emit CLOBBERs for variables which have static storage duration after gimplifying their initializers. * g++.dg/warn/Wdangling-pointer-pr110055.C: New testcase.=