public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "eggert at cs dot ucla.edu" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-93644-4-vScWUxX29w@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-93644-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644

--- Comment #11 from eggert at cs dot ucla.edu ---
Created attachment 49783
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49783&action=edit
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 
return-local-addr.i: In function ‘canonicalize_filename_mode’:
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.

  parent reply	other threads:[~2020-12-17  1:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-93644-4@http.gcc.gnu.org/bugzilla/>
2020-05-11 14:28 ` msebor at gcc dot gnu.org
2020-08-17 21:27 ` bruno at clisp dot org
2020-11-26 22:01 ` eggert at cs dot ucla.edu
2020-12-17  1:59 ` eggert at cs dot ucla.edu [this message]
2020-12-17  2:05 ` eggert at cs dot ucla.edu
2020-12-17  5:52 ` noloader at gmail dot com
2021-02-12  0:55 ` msebor at gcc dot gnu.org
2021-04-27 11:38 ` [Bug middle-end/93644] [10/11/12 " jakub at gcc dot gnu.org
2021-05-03 14:27 ` jochen447 at concept dot de
2021-05-04 12:31 ` rguenth at gcc dot gnu.org
2021-07-28  7:04 ` rguenth at gcc dot gnu.org
2021-10-06  2:01 ` egallager at gcc dot gnu.org
2021-10-06 15:16 ` msebor at gcc dot gnu.org
2022-03-10  4:20 ` grgoffe at yahoo dot com
2022-04-21  7:47 ` rguenth at gcc dot gnu.org
2022-12-13  0:14 ` [Bug middle-end/93644] [10/11/12/13 " egallager at gcc dot gnu.org
2023-05-29 10:02 ` [Bug middle-end/93644] [10/11/12/13/14 " jakub at gcc dot gnu.org
2023-06-15 15:49 ` pinskia at gcc dot gnu.org
2023-06-15 15:49 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-93644-4-vScWUxX29w@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).