From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 11F2D3861004; Mon, 17 Aug 2020 21:27:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 11F2D3861004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1597699667; bh=O7bD3S35xZVMvvj3yLFdikO+WZV4LNXGQ1OpjyvENSM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HHNPs7x/jyFRaIgHGJ/RVraTQokc3zRww9hzJmBBDdkMg3qwSVRoBuhREQWAUeKWg L0Sw9p4j/eyZXZ5w8utT4c2cJaIczlOgLSR4oQzjJh13n4Jl3Mo9Bn3qCCmjnQ7YsK m0LuHjLgZhPBJftYHWZaf/VDwAiutw1YGv0c0Rhc= From: "bruno at clisp dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/93644] [10/11 Regression] spurious -Wreturn-local-addr with PHI of PHI Date: Mon, 17 Aug 2020 21:27:46 +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: 10.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: bruno at clisp dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: law at redhat dot com X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Aug 2020 21:27:47 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93644 Bruno Haible changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bruno at clisp dot org --- Comment #9 from Bruno Haible --- We now have a generic workaround to this bug: If the bug occurs in a function foo: 1. Rename foo to foo_internal, mark it as '__attribute__ ((__noinline__)) static' and add a 'char stack_buf[1024]' parameter. 2. In the function foo_internal, drop the stack-allocated buffer and use the new parameter instead. 3. Create a new function foo, with the same signature as before, that merely allocates a 'char stack_buf[1024]' on the stack and passes it to foo_intern= al. For an example, see https://git.savannah.gnu.org/gitweb/?p=3Dgnulib.git;a=3Dcommitdiff;h=3D2a34= 68c9f263596815a3383c0157ba9a81cf2d24=