From: Aldy Hernandez <aldyh@redhat.com>
To: Andrew Pinski <pinskia@gmail.com>
Cc: Richard Guenther <richard.guenther@gmail.com>,
Diego Novillo <dnovillo@google.com>,
gcc-patches@gcc.gnu.org
Subject: [FORTRAN mainline] dereference POINTER_PLUS_EXPR check (was tuples)
Date: Thu, 22 Nov 2007 21:35:00 -0000 [thread overview]
Message-ID: <20071122172301.GA17740@redhat.com> (raw)
In-Reply-To: <de8d50360711211709k61f0f066lf483e97645564df2@mail.gmail.com>
On Wed, Nov 21, 2007 at 05:09:22PM -0800, Andrew Pinski wrote:
> On 11/21/07, Aldy Hernandez <aldyh@redhat.com> wrote:
> > 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?
>
> No it is correct. So we have char* = char[]& . That is incorrect
> where are the cast or address expression.
Thanks for the help guys.
The culprit is the fortran FE which is building a P_P_E with no regards
to type. The patch below uses [void *] when building BUILT_IN_MEMSET.
It has been tested on x86-linux, with no regressions on the Fortran test
cases.
OK for *mainline*, as it suffers from the same problem?
Aldy
* fortran/trans-expr.c (gfc_trans_string_copy): Use "void *" * when
building a memmove.
=== fortran/trans-expr.c
==================================================================
--- fortran/trans-expr.c (revision 130317)
+++ fortran/trans-expr.c (local)
@@ -2701,7 +2701,7 @@
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, ptr_type_node, dest,
fold_convert (sizetype, slen));
tmp4 = build_call_expr (built_in_decls[BUILT_IN_MEMSET], 3,
tmp4,
next prev parent reply other threads:[~2007-11-22 17:23 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 ` Aldy Hernandez [this message]
2007-11-22 21:56 ` [FORTRAN mainline] dereference POINTER_PLUS_EXPR check (was tuples) 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=20071122172301.GA17740@redhat.com \
--to=aldyh@redhat.com \
--cc=dnovillo@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=pinskia@gmail.com \
--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).