public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tkoenig 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: Tue, 30 Apr 2013 11:58:00 -0000	[thread overview]
Message-ID: <bug-56937-4-3U9VupvGDA@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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tkoenig at gcc dot gnu.org

--- Comment #7 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2013-04-30 11:58:43 UTC ---
(In reply to comment #6)
> Apparently there is no dependency analysis for array-vector assignments.

Correct, however...

> The
> following test create a temporary that is not needed
> 
> integer :: r(10), idx(4), jdx(4)
> r = [(i+10,i=1,10)]
> idx = [1, 2, 3, 4]
> jdx = [6, 7, 8, 9]
> r(idx) = r(jdx)
> print *, r
> end
> 
> r(idx) = r(jdx)
>          1
> Warning: Creating array temporary at (1)

Currently, we do not support assigning values to variables
and then later using the values for dependency analysis.

This would require forward propagation of values, which we
don't do in the front end.  Plus, a lot of dependency test cases
where we used variables to hide them from the optimization would
start failing ;-)


  parent reply	other threads:[~2013-04-30 11:58 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
2013-04-29 22:26 ` dominiq at lps dot ens.fr
2013-04-30 11:58 ` tkoenig at gcc dot gnu.org [this message]
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-3U9VupvGDA@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).