public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pault at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/35339] Improve translation of implied do loop in transfer
Date: Sun, 02 Mar 2008 08:00:00 -0000	[thread overview]
Message-ID: <20080302075959.5784.qmail@sourceware.org> (raw)
In-Reply-To: <bug-35339-10743@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from pault at gcc dot gnu dot org  2008-03-02 07:59 -------

> In the meantime, I am thinking through a different approach for aio that avoids
> the issue here.
> 

Yes it would - use gfc_conv_expr_descriptor to convert the expression and pass
the resulting array descriptor.  For the cases that you are concerned with,
this would be a temporary.  However, gfortran_transfer array would be used and
the io itself taken out of the loop. Obviously, this would only work for a
WRITE operation and gfc_conv_subref_array_arg would have to be used for a READ
- as in the existing code in gfc_trans_transfer.

In fact, I believe that the exsting code in gfc_trans_transfer would be able to
handle iterator expressions, were they passed to it.  However, the frontend
does this scalarization; see io.c(match_io_element):2396 onwards. This builds
up a DO loop and a call to EXEC_TRANSFER for each element.  Where there is only
one element, you will get what you want by turning the iterator expression into
an EXPR_ARRAY and writing the gfc_code to pass that to EXEC_TRANSFER.  I think
that it should be a very straightforward job.

Best of luck!

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-03-02 07:59:59
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35339


  parent reply	other threads:[~2008-03-02  8:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-24  1:41 [Bug fortran/35339] New: " jvdelisle at gcc dot gnu dot org
2008-02-25 10:01 ` [Bug fortran/35339] " fxcoudert at gcc dot gnu dot org
2008-03-01 16:23 ` jvdelisle at gcc dot gnu dot org
2008-03-02  8:00 ` pault at gcc dot gnu dot org [this message]
2008-03-13  5:20 ` jvdelisle at gcc dot gnu dot org
2009-10-31  1:42 ` jvdelisle at gcc dot gnu dot org
     [not found] <bug-35339-4@http.gcc.gnu.org/bugzilla/>
2013-08-31 18:27 ` 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=20080302075959.5784.qmail@sourceware.org \
    --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).