From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix PR60115
Date: Mon, 10 Feb 2014 13:28:00 -0000 [thread overview]
Message-ID: <20140210132804.GJ20378@tucnak.redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.11.1402101421500.1593@zhemvz.fhfr.qr>
On Mon, Feb 10, 2014 at 02:22:44PM +0100, Richard Biener wrote:
>
> This fixes PR60115 where the issue is that tree_could_trap_p does
> not evaluate MEM_REFs for possibly out-of-bound accesses (in case
> the access is lowered from an ARRAY_REF where the code does that).
>
> I've unified TARGET_MEM_REF and MEM_REF handling and made the
> order of checking for trapping base and !TREE_THIS_NOTRAP match
> the (non-obvious?) way ARRAY_REF handling works.
>
> Testing for an overlap of at least on byte (thus not considering
> the size of the access) should be ok IMHO as alignment constraints
> or outer component refs should impose enough constraints that
> the source should be invalid if that's not enough.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu.
>
> Does this look sane?
LGTM.
> 2014-02-10 Richard Biener <rguenther@suse.de>
>
> PR tree-optimization/60115
> * tree-eh.c (tree_could_trap_p): Unify TARGET_MEM_REF and
> MEM_REF handling. Properly verify that the accesses are not
> out of the objects bound.
>
> * gcc.dg/torture/pr60115.c: New testcase.
Jakub
prev parent reply other threads:[~2014-02-10 13:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-10 13:23 Richard Biener
2014-02-10 13:28 ` Jakub Jelinek [this message]
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=20140210132804.GJ20378@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/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).