public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "antony at cosmologist dot info" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/64678] New: Expected association error on dependent associate statements
Date: Tue, 20 Jan 2015 00:09:00 -0000	[thread overview]
Message-ID: <bug-64678-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64678

            Bug ID: 64678
           Summary: Expected association error on dependent associate
                    statements
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: antony at cosmologist dot info

In trunk

module X
  Type T
   integer :: map
  end Type T
contains

subroutine DoBug
Type(T) TT

 associate(A=>TT, B=>A%map)
 end associate

end subroutine
end module X

gives:

testbug.f90:10:17:

  associate(A=>TT, B=>A%map)
                 1
Error: Expected association at (1)
testbug.f90:11:4:

  end associate
    1

It's not entirely clear to me from the standard if this is allowed, but I don't
see why not (useful when you are breaking up complicated array/class structures
into associate names, where the second name refers to the first). It compiles
in ifort. Obviously low priority as can be worked around easily enough


             reply	other threads:[~2015-01-20  0:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20  0:09 antony at cosmologist dot info [this message]
2015-01-20  1:45 ` [Bug fortran/64678] " kargl at gcc dot gnu.org
2015-01-20  2:11 ` dominiq at lps dot ens.fr
2015-01-24 12:00 ` antony at cosmologist dot info
2015-01-24 12:15 ` dominiq at lps dot ens.fr
2015-01-24 14:05 ` anlauf at gmx dot de

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-64678-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).