This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/64678] New: Expected association error on dependent associate statements


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]