public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/43412] [OOP] BT_CLASS does not does not set array spec
Date: Wed, 28 Apr 2010 08:58:00 -0000	[thread overview]
Message-ID: <20100428085743.6393.qmail@sourceware.org> (raw)
In-Reply-To: <bug-43412-13404@http.gcc.gnu.org/bugzilla/>



------- Comment #1 from burnus at gcc dot gnu dot org  2010-04-28 08:57 -------
Created an attachment (id=20505)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20505&action=view)
coarray_13.f90 test case

Depending on this fix are constraint checking for coarrays, cf. attached test
case.

  * * *

Current result:
  allocate(t :: z[*])
                  1
Error: Unexpected coarray designator at (1)

Reason: gfc_match_array_ref's corank argument is 0. And the argument is sym->as
or component->as (cf. primary).

 * * *

  class(t), allocatable :: z[:] ! Fails due to "sym->attr.allocatable
                               1
Error: Variable 'z' at (1) is a coarray or has a coarray component and is not
ALLOCATABLE, SAVE nor a dummy argument


See check in resolve.c's resolve_symbol. And I do not really want to add tons
of special cases for BT_CLASS; the check is already quite long:

  /* F2008, C526.  The function-result case was handled above.  */
  if (((sym->ts.type == BT_DERIVED && sym->ts.u.derived->attr.coarray_comp)
       || sym->attr.codimension)
      && !(sym->attr.allocatable || sym->attr.dummy || sym->attr.save
           || sym->ns->proc_name->attr.flavor == FL_MODULE
           || sym->ns->proc_name->attr.is_main_program
           || sym->attr.function || sym->attr.result || sym->attr.use_assoc))

 * * *

Possibly related: PR 41539 (also "as = NULL").


-- 


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


  reply	other threads:[~2010-04-28  8:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-17 22:20 [Bug fortran/43412] New: " burnus at gcc dot gnu dot org
2010-04-28  8:58 ` burnus at gcc dot gnu dot org [this message]
     [not found] <bug-43412-4@http.gcc.gnu.org/bugzilla/>
2012-01-29  0:47 ` [Bug fortran/43412] " dominiq at lps dot ens.fr
2013-06-11 15:25 ` mikael 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=20100428085743.6393.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).