public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@redhat.com>
To: Richard Guenther <richard.guenther@gmail.com>
Cc: Diego Novillo <dnovillo@google.com>, gcc-patches@gcc.gnu.org
Subject: Re: [tuples] dereference POINTER_PLUS_EXPR check
Date: Thu, 22 Nov 2007 01:26:00 -0000	[thread overview]
Message-ID: <20071121225800.GA5508@redhat.com> (raw)
In-Reply-To: <84fc9c000711211357w7a2587d2n663dd561845e4e1c@mail.gmail.com>

On Wed, Nov 21, 2007 at 10:57:30PM +0100, Richard Guenther wrote:
> On Nov 21, 2007 10:52 PM, Aldy Hernandez <aldyh@redhat.com> wrote:
> > > Maybe we could make this a helper in tree.c.  Something like
> > > pointed_to_type().  I don't think one exists already, but I may be wrong.
> >
> > Things are a bit cleaner now too, bonus!
> >
> > Is this OK?
> 
> No, sorry.  It doesn't make sense to check the pointed-to types.  Or do you
> say the modify expr embeds a de-reference?

The modify_expr now embeds a POINTER_PLUS_EXPR.  

Where previously we had:

	(MODIFY_EXPR lhs (POINTER_PLUS_EXPR rhs1 rhs2))

We now have:

	(GIMPLE_ASSIGN lhs rhs1 rhs2)

with the POINTER_PLUS_EXPR in the subcode of the GIMPLE_ASSIGN.  We have
collapsed the MODIFY_EXPR and the POINTER_PLUS_EXPR nodes into one
tuple.

Previously, we would verify type sanity by checking the type of the LHS
(which should be a pointer) with the type of the P_P_E.  We no longer
have the P_P_E with its type, so now we must look at the pointed-to
types of both lhs and rhs1.

Why do you think it doesn't make sense to look at the pointed-to types?

Aldy

  reply	other threads:[~2007-11-21 22:58 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-21 22:03 Aldy Hernandez
2007-11-21 23:03 ` Diego Novillo
2007-11-21 23:25   ` Aldy Hernandez
2007-11-21 23:43     ` Richard Guenther
2007-11-22  1:26       ` Aldy Hernandez [this message]
2007-11-22  7:35         ` Richard Guenther
2007-11-22 11:32           ` Aldy Hernandez
2007-11-22 12:08             ` Andrew Pinski
2007-11-22 21:35               ` [FORTRAN mainline] dereference POINTER_PLUS_EXPR check (was tuples) Aldy Hernandez
2007-11-22 21:56                 ` Richard Guenther
2007-11-23 11:38                   ` Aldy Hernandez
2007-11-23 12:13                     ` Richard Guenther
2007-11-24 20:54                     ` libgomp failure (was: Re: [FORTRAN mainline] dereference POINTER_PLUS_EXPR check) Tobias Burnus
2007-11-25 16:13                       ` Aldy Hernandez
2007-11-25 21:32                       ` Aldy Hernandez
2007-11-25 21:59                         ` Richard Guenther
2007-11-27 13:24                         ` [PATCH] Fix fortran libgomp failures Jakub Jelinek
2007-11-27 16:51                           ` Richard Guenther
2007-11-28 19:39                             ` Tobias Burnus
2007-11-22 22:09                 ` [FORTRAN mainline] dereference POINTER_PLUS_EXPR check (was tuples) Tobias Burnus
2007-11-22 13:43             ` [tuples] dereference POINTER_PLUS_EXPR check Richard Guenther
2007-11-22 15:34           ` Diego Novillo
2007-11-22 18:56             ` Aldy Hernandez
2007-11-21 23:31 ` Richard Guenther

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=20071121225800.GA5508@redhat.com \
    --to=aldyh@redhat.com \
    --cc=dnovillo@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /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).