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/47505] New: [OOP] Intrinsics which should operate on polymorphic objects (BT_CLASS)
Date: Fri, 28 Jan 2011 09:30:00 -0000	[thread overview]
Message-ID: <bug-47505-4@http.gcc.gnu.org/bugzilla/> (raw)

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

           Summary: [OOP] Intrinsics which should operate on polymorphic
                    objects (BT_CLASS)
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: janus@gcc.gnu.org


Bob (Robert Corbett of Oracle) reports at
http://j3-fortran.org/pipermail/j3/2011-January/004136.html

that most compilers do not return a BT_CLASS when invoking one of the following
procedures; I have not checked - especially as polymorphic arrays are not yet
supported. But I wouldn't be surprised if gfortran had the same problems:

<quote>
The Fortran standard explicitly indicates that a few intrinsic
functions (EXTENDS_TYPE_OF, SAME_TYPE_AS, and STORAGE_SIZE)
accept polymorphic arguments.

The list of intrinsic procedures that satisfy these criteria are

      ALLOCATED        ASSOCIATED        EXTENDS_TYPE_OF
      IMAGE_INDEX      IS_CONTIGUOUS     LBOUND
      LCOBOUND         MOVE_ALLOC        PRESENT
      SAME_TYPE_AS     SHAPE             SIZE
      STORAGE_SIZE     THIS_IMAGE        UBOUND
      UCOBOUND
[...]
This side thinks the following additional functions should accept
polymorphic arguments

      CSHIFT       EOSHIFT       MERGE      PACK
      RESHAPE      SHAPE         SIZE       SPREAD
      TRANSFER     TRANSPOSE     UNPACK
</quote>

And in a follow up:

<quote>
None of the implementations I tried treats the results of these
intrinsic functions as polymorphic.  Some implementations gave no
diagnostic message for passing polymorphic acutal arguments to the
intrinsic functions, but none allowed the results to be used in
contexts that required polymorphism.  I admit I find that strange.
</quote>


             reply	other threads:[~2011-01-28  8:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-28  9:30 burnus at gcc dot gnu.org [this message]
2011-01-28 12:01 ` [Bug fortran/47505] " janus at gcc dot gnu.org
2012-11-06 11:31 ` janus 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-47505-4@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).