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

            Bug ID: 65187
           Summary: Bogus error with ASSOCIATE and deferred-length
                    CHARACTER
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org

Found at https://groups.google.com/forum/#!topic/comp.lang.fortran/AxqHqIavLwA

The following is rejected with

    asc: associate ( s => foo )
                             1
Error: Entity ā€˜sā€™ at (1) has a deferred type parameter and requires either the
pointer or allocatable attribute


program p
   implicit none
   character(len=:), allocatable :: foo
   foo = "Hello World!"
   asc: associate ( s => foo )
      print *, " foo says ", s
      blk: block
         print *, " foo says ", s
      end block blk
   end associate asc
   stop
end program p

Reply via email to