public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Eric Botcazou <ebotcazou@adacore.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch] Do not directly change TARGET_MEM_REF in maybe_canonicalize_mem_ref_addr
Date: Fri, 16 Jun 2017 07:51:00 -0000	[thread overview]
Message-ID: <CAFiYyc3y-8ZEe=pQAQ5_t=4g3K6HeXmx9_cLEZnoX_CSkV8cbQ@mail.gmail.com> (raw)
In-Reply-To: <59903573.zuAO1vMF2R@polaris>

On Thu, Jun 15, 2017 at 3:51 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> the transformation done to TARGET_MEM_REF in maybe_canonicalize_mem_ref_addr
> is exactly the same as one of those done in maybe_fold_tmr, the latter is
> better written and the former function calls the latter, so this patch changes
> maybe_canonicalize_mem_ref_addr to avoid touching TARGET_MEM_REF directly.
>
> Tested on x86-64/Linux, OK for the mainline?

I don't think so.  get_address_description assumes TMR_BASE is in
canonical form,
that is, when it is an ADDR_EXPR we have a symbol and when not we have
a pointer.
TMR[&p->a] violates this and the gimple-fold.c part first canonicalizes this to
TMR[p + offsetof(a)].

Richard.

>
> 2017-06-15  Eric Botcazou  <ebotcazou@adacore.com>
>
>         PR bootstrap/80897
>         * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Do not change
>         TARGET_MEM_REF expressions directly.
>
> --
> Eric Botcazou

  reply	other threads:[~2017-06-16  7:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-15 13:51 Eric Botcazou
2017-06-16  7:51 ` Richard Biener [this message]
2017-06-16 10:26   ` Eric Botcazou
2017-06-16 10:46     ` Richard Biener

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='CAFiYyc3y-8ZEe=pQAQ5_t=4g3K6HeXmx9_cLEZnoX_CSkV8cbQ@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=ebotcazou@adacore.com \
    --cc=gcc-patches@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).