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: fortran@gcc.gnu.org, "Andrew Pinski" <pinskia@gmail.com>,
	 	"Diego Novillo" <dnovillo@google.com>,
	gcc-patches@gcc.gnu.org
Subject: Re: [FORTRAN mainline] dereference POINTER_PLUS_EXPR check (was tuples)
Date: Fri, 23 Nov 2007 12:13:00 -0000	[thread overview]
Message-ID: <84fc9c000711230145ka19a091ob8ff98bceb23d971@mail.gmail.com> (raw)
In-Reply-To: <20071123002727.GA16608@redhat.com>

On Nov 23, 2007 1:27 AM, Aldy Hernandez <aldyh@redhat.com> wrote:
> > It should use the type of DEST, all pointers are trivially convertible
> > to void *,
> > which is the formal argument of memset (in the ChangeLog you have memmove).
> >
> > Not that it makes a big difference here (in the end we try to be type-exact in
> > one expression tree, but as the expression result type will vanish with tuples,
> > there won't a difference for both cases).
>
> Fixed below.
>
> > I wonder if the problem you see has been fixed with the fix for PR31608 which
> > went in a few days ago?
>
> No.  Latest mainline still exhibited the same problem.  The P_P_E was
> still wrong.
>
> I know Tobias approved the patch, but let me know if this updated one
> using the type of [dest] is what you wanted.

Yes, thanks.

Richard.

> No regressions on fortran tests.
>
> Aldy
>
>         * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
>         memset.
>
> --- trans-expr.c        (revision 130355)
> +++ trans-expr.c        (local)
> @@ -2701,7 +2701,7 @@ gfc_trans_string_copy (stmtblock_t * blo
>    tmp3 = build_call_expr (built_in_decls[BUILT_IN_MEMMOVE],
>                           3, dest, src, slen);
>
> -  tmp4 = fold_build2 (POINTER_PLUS_EXPR, pchar_type_node, dest,
> +  tmp4 = fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (dest), dest,
>
>                       fold_convert (sizetype, slen));
>    tmp4 = build_call_expr (built_in_decls[BUILT_IN_MEMSET], 3,
>                           tmp4,
>

  reply	other threads:[~2007-11-23  9:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-21 22:03 [tuples] dereference POINTER_PLUS_EXPR check 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 [this message]
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=84fc9c000711230145ka19a091ob8ff98bceb23d971@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=aldyh@redhat.com \
    --cc=dnovillo@google.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=pinskia@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).