From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7B024389041F; Thu, 17 Dec 2020 01:59:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7B024389041F From: "eggert at cs dot ucla.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/93644] [10/11 Regression] spurious -Wreturn-local-addr with PHI of PHI Date: Thu, 17 Dec 2020 01:59:42 +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: eggert at cs dot ucla.edu 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: attachments.created 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: Thu, 17 Dec 2020 01:59:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93644 --- Comment #11 from eggert at cs dot ucla.edu --- Created attachment 49783 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D49783&action=3Dedit another instance of a -Wreturn-local-addr false alarm I ran into a different instance of the bug today, while working on another Gnulib source file lib/canonicalize.c. A stripped-down test case attached. = To reproduce the problem: $ gcc -O2 -S return-local-addr.i=20 return-local-addr.i: In function =E2=80=98canonicalize_filename_mode=E2=80= =99: cc1: warning: function may return address of local variable [-Wreturn-local-addr] return-local-addr.i:28:25: note: declared here 28 | struct scratch_buffer rname_buffer; | ^~~~~~~~~~~~ This is with GCC 10.2.1 20201125 (Red Hat 10.2.1-9) on x86-64.=