public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <richard.guenther@gmail.com>
To: Paul Richard Thomas <paul.richard.thomas@gmail.com>
Cc: Janus Weil <janus@gcc.gnu.org>, gfortran <fortran@gcc.gnu.org>,
	 	gcc-patches <gcc-patches@gcc.gnu.org>,
	salvatore.filippone@uniroma2.it
Subject: Re: [Patch, Fortran] PR 41714: [OOP] ALLOCATE SOURCE= does not  	properly copy the value from SOURCE
Date: Sun, 25 Oct 2009 15:13:00 -0000	[thread overview]
Message-ID: <84fc9c000910250810i2b5025c1kc56ebd0c3e0730f7@mail.gmail.com> (raw)
In-Reply-To: <339c37f20910250752w51dd08d5tea70ac6e925f78f3@mail.gmail.com>

On Sun, Oct 25, 2009 at 3:52 PM, Paul Richard Thomas
<paul.richard.thomas@gmail.com> wrote:
> Janus,
>
> It looks OK to me except:
>
>>        PR fortran/41714
>>        * trans-expr.c (gfc_build_memcpy_call): Take care of the case that the
>>        call to '__builtin_memcpy' is optimized away (replaced by a direct
>>        assignment).
>
> How the heck does that work?  It comes out as a NOP_EXPR and yet it's
> really an assignment..... Is that documented somewhere?

That patch looks indeed dubious.  It tests for an implementation detail
(the memcpy folder returns (void *) ({ *dst = *src; dst; })).  You should
be able to unconditionally fold-convert to void_type_node as in the
original code.  Instead tree_annotate_all_with_location should be fixed.

Richard.

  reply	other threads:[~2009-10-25 15:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-25 11:49 Janus Weil
2009-10-25 15:11 ` Paul Richard Thomas
2009-10-25 15:13   ` Richard Guenther [this message]
2009-10-25 15:45     ` Richard Guenther
2009-10-25 18:05       ` Janus Weil
2009-10-25 19:00         ` Richard Guenther
2009-10-25 19:12           ` Janus Weil
2009-10-25 21:42             ` Janus Weil
2009-10-25 21:46               ` Janus Weil
2009-10-25 21:58                 ` Richard Guenther
2009-10-25 22:10                   ` Janus Weil
2009-10-25 22:28                     ` Richard Guenther
2009-10-25 23:12                       ` Janus Weil
2009-10-26  9:29                         ` Janus Weil
2009-10-26  9:31                         ` Janus Weil

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=84fc9c000910250810i2b5025c1kc56ebd0c3e0730f7@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=janus@gcc.gnu.org \
    --cc=paul.richard.thomas@gmail.com \
    --cc=salvatore.filippone@uniroma2.it \
    /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).