public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mikael at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/56937] Unnecessarily temporary with array-vector assignments
Date: Sat, 13 Apr 2013 10:32:00 -0000 [thread overview]
Message-ID: <bug-56937-4-vt6Paloi7l@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56937-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56937
--- Comment #5 from Mikael Morin <mikael at gcc dot gnu.org> 2013-04-13 10:32:46 UTC ---
(In reply to comment #0)
> tmp(2) = r(1) + 0.25 ! r(1:4) == 0
> tmp(2) = r(2) + 0.25
> tmp(3) = r(3) + 0.25
> tmp(2) = r(4) + 0.25
> r(2) = tmp(2) ! = 0.25
> r(2) = tmp(2) ! = 0.25
> r(3) = tmp(3) ! = 0.25
> r(2) = tmp(2) ! = 0.25
> -> sum(r) = 0.5
>
By the way, it's rather:
tmp(1) = r(2) + 0.25 ! r(1:4) == 0
tmp(2) = r(2) + 0.25
tmp(3) = r(3) + 0.25
tmp(4) = r(2) + 0.25
r(2) = tmp(1) ! = 0.25
r(2) = tmp(2) ! = 0.25
r(3) = tmp(3) ! = 0.25
r(2) = tmp(4) ! = 0.25
-> sum(r) = 0.5
next prev parent reply other threads:[~2013-04-13 10:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 18:12 [Bug fortran/56937] New: " burnus at gcc dot gnu.org
2013-04-12 20:56 ` [Bug fortran/56937] " dominiq at lps dot ens.fr
2013-04-12 21:28 ` burnus at gcc dot gnu.org
2013-04-13 10:15 ` mikael at gcc dot gnu.org
2013-04-13 10:26 ` mikael at gcc dot gnu.org
2013-04-13 10:32 ` mikael at gcc dot gnu.org [this message]
2013-04-29 22:26 ` dominiq at lps dot ens.fr
2013-04-30 11:58 ` tkoenig at gcc dot gnu.org
2013-04-30 12:15 ` dominiq at lps dot ens.fr
2013-04-30 12:35 ` burnus at gcc dot gnu.org
2013-07-21 13:47 ` tkoenig at gcc dot gnu.org
2013-07-21 13:50 ` tkoenig at gcc dot gnu.org
2013-08-09 9:20 ` tkoenig at gcc dot gnu.org
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=bug-56937-4-vt6Paloi7l@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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).