From: Jeff Law <law@redhat.com>
To: Marc Glisse <marc.glisse@inria.fr>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Warn when returning the address of a temporary (middle-end) v2
Date: Thu, 31 Jul 2014 04:54:00 -0000 [thread overview]
Message-ID: <53D9CBCA.4050702@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1407221056190.1843@laptop-mg.saclay.inria.fr>
On 07/22/14 03:03, Marc Glisse wrote:
>> I note you don't catch return &localvar in the isolation code -- it
>> looks like you just catch those which potentially flow from PHIs.
>
> I thought I was handling it in the find_explicit_erroneous_behaviour
> part of the patch (as opposed to the implicit part which deals with
> PHIs). Function f1 in the testcase addrtmp.c has no PHI. Am I missing
> something?
I must have missed that whole block of code. So, no, I don't think you
missed anything. My bad. I'm going to choose to blame it on using a
laptop screen on the road rather than my usual monitor at home.
>
>> I realize you're primarily catching that in the front-ends, but can't
>> we have cases which aren't caught by the front end, but after
>> optimizations we're able to propagate &somelocal into the return
>> statement?
>
> We can, and it was my original motivation. I only added PHI handling
> when you asked for it.
Note my comment/question makes no sense now that we've settled that you
do have the right code in find_explicit_erroneous_behavior :-)
>
>> It generally looks good and I'm ready to approve if the answer to the
>> above question is "can't happen". If it can happen, then we ought to
>> handle it in the isolation code as well (ought to be relatively easy).
>
> Just to be clear, the approval would include the PARM_DECL tweak in
> https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02327.html
Yes.
jeff
next prev parent reply other threads:[~2014-07-31 4:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-22 18:20 Marc Glisse
2014-06-29 9:22 ` Marc Glisse
2014-06-30 21:04 ` Jeff Law
2014-06-30 21:37 ` Marc Glisse
2014-07-02 12:19 ` Alan Modra
2014-07-02 12:41 ` Marc Glisse
2014-07-02 22:39 ` Jeff Law
2014-07-02 22:46 ` Jeff Law
2014-07-18 5:06 ` Jeff Law
2014-07-22 9:04 ` Marc Glisse
2014-07-31 4:54 ` Jeff Law [this message]
2014-07-27 18:20 ` Richard Sandiford
2014-07-27 19:09 ` Marc Glisse
2014-07-27 20:45 ` Andreas Schwab
2014-07-27 21:05 ` Marc Glisse
2014-07-29 19:00 ` Marc Glisse
2014-07-29 19:13 ` David Malcolm
2014-07-29 19:22 ` Marek Polacek
2014-07-29 19:47 ` David Malcolm
2014-07-29 19:28 ` Marc Glisse
2014-07-30 12:00 ` Marc Glisse
2014-07-31 4:58 ` Jeff Law
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=53D9CBCA.4050702@redhat.com \
--to=law@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=marc.glisse@inria.fr \
/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).