public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Richard Guenther" <richard.guenther@gmail.com>
To: "Aldy Hernandez" <aldyh@redhat.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 13:43:00 -0000	[thread overview]
Message-ID: <84fc9c000711220142l578ce21aie30334a0680b8f6@mail.gmail.com> (raw)
In-Reply-To: <20071122005837.GA7171@redhat.com>

On Nov 22, 2007 1:58 AM, Aldy Hernandez <aldyh@redhat.com> wrote:
> > now due to the transitiveness of u_t_c, we now simply need to check
> >
> >   useless_type_conversion (lhs, op0)
> >
> > which in your notation is lhs and rhs1.  Which is exactly what the code did
> > before your patch.
>
> ...
>
> > Why are the pointed-to types relevant at all?  Type relations for the
> > pointed-to types don't necessary translate to the relations of the
> > pointer types.
> > For example useless_type_conversion (void *, int *) == true but
> > useless_type_conversion (void, int) is certainly not true.
>
> This is the failed testcase that prompted the patch:
>
> (gdb) ptt lhs_type
>  <pointer_type 0x2aaaaf571600
>     type <integer_type 0x2aaaaf559240 character(kind=1) public unsigned string-flag QI
>
> ...
>
> (gdb) ptt rhs1_type
>  <reference_type 0x2aaaaf5e6240
>     type <array_type 0x2aaaaf5e6180
>         type <integer_type 0x2aaaaf559240 character(kind=1) public unsigned string-flag QI
>
> u_t_c(lhs_type, rhs1_type) fails because it doesn't look far enough
> down, but you're saying it shouldn't.  Is u_t_c wrong then?

Andrew is right, this is a type mismatch.

Richard.

  parent reply	other threads:[~2007-11-22  9:42 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
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             ` Richard Guenther [this message]
2007-11-22 15:34           ` [tuples] dereference POINTER_PLUS_EXPR check 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=84fc9c000711220142l578ce21aie30334a0680b8f6@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=aldyh@redhat.com \
    --cc=dnovillo@google.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).