public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/56849] Missing compile-time shape check for RESHAPE assignments with an ORDER= attribute
Date: Fri, 05 Apr 2013 20:38:00 -0000 [thread overview]
Message-ID: <bug-56849-4-08VdP4Xhwc@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56849-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56849
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-05 20:38:05 UTC ---
Seems as if someone missed the purpose of ORDER=, which doesn't affect the
shape:
print *, shape (reshape([1,2,3,4,5,6], [2,3], order=[1,2]))
print *, shape (reshape([1,2,3,4,5,6], [2,3], order=[2,1]))
print *, reshape([1,2,3,4,5,6], [2,3], order=[1,2])
print *, reshape([1,2,3,4,5,6], [2,3], order=[2,1])
end
prints:
2 3
2 3
1 2 3 4 5 6
1 4 2 5 3 6
>From gfc_resolve_reshape. The "order == NULL" check is wrong:
/* TODO: Make this work with a constant ORDER parameter. */
if (shape->expr_type == EXPR_ARRAY
&& gfc_is_constant_expr (shape)
&& order == NULL)
{
gfc_constructor *c;
f->shape = gfc_get_shape (f->rank);
next prev parent reply other threads:[~2013-04-05 20:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-05 19:03 [Bug fortran/56849] New: Missing compile-time shape check for RESHAPE assignments burnus at gcc dot gnu.org
2013-04-05 20:02 ` [Bug fortran/56849] " dominiq at lps dot ens.fr
2013-04-05 20:18 ` burnus at gcc dot gnu.org
2013-04-05 20:25 ` [Bug fortran/56849] Missing compile-time shape check for RESHAPE assignments with an ORDER= attribute dominiq at lps dot ens.fr
2013-04-05 20:38 ` burnus at gcc dot gnu.org [this message]
2013-04-08 20:13 ` burnus at gcc dot gnu.org
2013-04-08 20:14 ` burnus 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-56849-4-08VdP4Xhwc@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).