public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mikael at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/38852] UBOUND fails for negative stride triplets
Date: Tue, 20 Jan 2009 22:30:00 -0000	[thread overview]
Message-ID: <20090120223002.31368.qmail@sourceware.org> (raw)
In-Reply-To: <bug-38852-15620@http.gcc.gnu.org/bugzilla/>



------- Comment #4 from mikael at gcc dot gnu dot org  2009-01-20 22:29 -------
(In reply to comment #3)
> DLA => DDA(2:3, 1:3:2, 5:4:-1, NF2, NF5:NF2:MF2)
> 
> The descriptor built for DLA has negative strides for dimension >= 3. 
> This makes ubound fail. 
> 
Forget this

DLA => DDA(2:3, 1:3:2, 5:4:-1, NF2, NF5:NF2:MF2)

    dla.dim[0].lbound = 1;
    dla.dim[0].ubound = 2;
    dla.dim[0].stride = 1;
    dla.dim[1].lbound = 1;
    dla.dim[1].ubound = 2;
    dla.dim[1].stride = 10;
    dla.dim[2].lbound = 1;
    dla.dim[2].ubound = 2;
    dla.dim[2].stride = -25;
    dla.dim[3].lbound = 1;
    dla.dim[3].ubound = D.1563 + 1;
    dla.dim[3].stride = D.1561 * 625;

There is a distinction to make between user-provided bounds and
front-end-generated bounds. 
   In the former case (original array) the array is non-empty if ubound >
lbound and stride > 0 or if ubound < lbound and stride < 0. 
   In the latter case, it is non-empty if ubound > lbound only. Comparing
ubound and lbound according to the stride to check for zero-sized arrays
doesn't make sense in this case (see dimension 2 of dla). 


-- 


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


  parent reply	other threads:[~2009-01-20 22:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-14 22:00 [Bug fortran/38852] New: " dick dot hendrickson at gmail dot com
2009-01-14 22:08 ` [Bug fortran/38852] " dominiq at lps dot ens dot fr
2009-01-15  5:56 ` jv244 at cam dot ac dot uk
2009-01-15  5:58 ` jv244 at cam dot ac dot uk
2009-01-19 18:48 ` mikael at gcc dot gnu dot org
2009-01-20 22:30 ` mikael at gcc dot gnu dot org [this message]
2009-01-22 12:40 ` pault at gcc dot gnu dot org
2009-01-25 18:22 ` pault at gcc dot gnu dot org
2009-01-25 21:08 ` pault at gcc dot gnu dot org
2009-01-27 12:16 ` [Bug fortran/38852] [Fix pending] " pault at gcc dot gnu dot org
2009-01-28 17:31 ` pault at gcc dot gnu dot org
2009-01-28 17:33 ` pault at gcc dot gnu dot org
2009-01-28 20:52 ` pault at gcc dot gnu dot org
2009-01-28 21:49 ` pault at gcc dot gnu dot org
2009-01-28 21:52 ` [Bug fortran/38852] [4.3] " pault at gcc dot gnu dot org
2009-02-19  6:44 ` pault at gcc dot gnu dot org
2009-02-19  6:44 ` pault at gcc dot gnu dot 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=20090120223002.31368.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).