public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/60458] New: Error message on associate: deferred type parameter and requires either the pointer or allocatable attribute
@ 2014-03-07 16:50 antony at cosmologist dot info
  2014-03-07 20:38 ` [Bug fortran/60458] " janus at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: antony at cosmologist dot info @ 2014-03-07 16:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60458
           Summary: Error message on associate: deferred type parameter
                    and requires either the pointer or allocatable
                    attribute
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: antony at cosmologist dot info

module A
    Type T
    contains
    procedure :: Test
    procedure :: TestP
    end type
    contains

    subroutine test(this)
    class(T) this

    associate(S=> this%TestP())
        print *,S
        end associate

    end subroutine

    function TestP(this)
    class(T) this
    character(LEN=:), allocatable :: TestP
    TestP =''
    end function TestP

    end module


gives error

    associate(S=> this%TestP())
                              1
Error: Entity 's' at (1) has a deferred type parameter and requires either the
pointer or allocatable attribute

At best the error message is unhelpful (defining S with pointer attribute does
not help), and the code seems valid (though it also happens to ICE ifort).


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-03-10 18:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-07 16:50 [Bug fortran/60458] New: Error message on associate: deferred type parameter and requires either the pointer or allocatable attribute antony at cosmologist dot info
2014-03-07 20:38 ` [Bug fortran/60458] " janus at gcc dot gnu.org
2014-03-10 11:44 ` janus at gcc dot gnu.org
2014-03-10 12:16 ` antony at cosmologist dot info
2014-03-10 18:25 ` janus at gcc dot gnu.org
2014-03-10 18:32 ` dominiq at lps dot ens.fr

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