[Bug fortran/13930] New: derived type with intent(in) attribute not accepted
Mart dot Rentmeester at sci dot kun dot nl
gcc-bugzilla@gcc.gnu.org
Fri Jan 30 11:37:00 GMT 2004
The following program fails to compile: the compiler generates
an error. It is however a compiler error, and not one in the
program as it says.
> gfortran -c x.f95
In file x.f95:25
function f1(f)
1
Error: Can't assign to INTENT(IN) variable 'f' at (1)
module gd
integer :: i = 0
type t
private
integer :: i = 0
end type
contains
!*******************************************************************************
function f2(f)
implicit none
integer, intent(in) :: f
integer :: f2
integer, external :: external_f
f2 = external_f(f)
end function f2
!*******************************************************************************
function f1(f)
implicit none
type(t), intent(in) :: f
integer :: f1
integer, external :: external_f
f1 = external_f(f%i)
end function f1
!*******************************************************************************
end module gd
--
Summary: derived type with intent(in) attribute not accepted
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Mart dot Rentmeester at sci dot kun dot nl
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13930
More information about the Gcc-bugs
mailing list