public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bruno at clisp dot org" <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: Mon, 17 Aug 2020 21:27:46 +0000	[thread overview]
Message-ID: <bug-93644-4-i3HkaTDHMO@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

Bruno Haible <bruno at clisp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bruno at clisp dot org

--- Comment #9 from Bruno Haible <bruno at clisp dot org> ---
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_internal.

For an example, see
https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=2a3468c9f263596815a3383c0157ba9a81cf2d24

  parent reply	other threads:[~2020-08-17 21:27 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 [this message]
2020-11-26 22:01 ` eggert at cs dot ucla.edu
2020-12-17  1:59 ` eggert at cs dot ucla.edu
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-i3HkaTDHMO@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).