[Bug fortran/71023] New: Problem with associate and function returning derived type
mrestelli at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon May 9 13:44:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71023
Bug ID: 71023
Summary: Problem with associate and function returning derived
type
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: mrestelli at gmail dot com
Target Milestone: ---
gfortran does not compile the following valid code:
module m
implicit none
type :: t
integer :: i
end type t
contains
pure function make_a_t(i) result(at)
integer, intent(in) :: i
type(t) :: at
at%i = i
end function make_a_t
subroutine s()
associate( my_t => make_a_t(5) )
write(*,*) my_t%i
end associate
end subroutine s
end module m
$ gfortran -c asb.f90 -o asb.o
asb.f90:20:18:
write(*,*) my_t%i
1
Error: Symbol »my_t« at (1) has no IMPLICIT type
$ gfortran --version
GNU Fortran (GCC) 7.0.0 20160422 (experimental)
More information about the Gcc-bugs
mailing list