This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/71023] New: Problem with associate and function returning derived type
- From: "mrestelli at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 09 May 2016 13:44:34 +0000
- Subject: [Bug fortran/71023] New: Problem with associate and function returning derived type
- Auto-submitted: auto-generated
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)