This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR31154 , PR31229 and PR33334 - use associated or imported function characteristics.
- From: dominiq at lps dot ens dot fr (Dominique Dhumieres)
- To: paul dot richard dot thomas at gmail dot com, dominiq at lps dot ens dot fr
- Cc: fortran at gcc dot gnu dot org
- Date: Sat, 29 Sep 2007 21:39:56 +0200
- Subject: Re: [Patch, fortran] PR31154 , PR31229 and PR33334 - use associated or imported function characteristics.
- References: <20070926152517.634285BB9F@mailhost.lps.ens.fr> <339c37f20709290257u5424ebffrddc61a9302b58958@mail.gmail.com>
> That's because the testcase is in error:-)
I did not have time yet to build gfortran with the new patch,
but what does it do with the following code:
type(foo) function ext_fun()
type foo
sequence
integer :: i
end type foo
ext_fun%i = 1
end function ext_fun
end
that is accepted by xlf (sequence required) and g95 (with/without sequence),
but gives with the previous patch:
derived_function_interface_1_red.f90:6.2:
ext_fun%i = 1
1
Error: Unclassifiable statement at (1)
derived_function_interface_1_red.f90:1:
type(foo) function ext_fun()
1
Error: The type for function 'ext_fun' at (1) is not accessible
Note that without sequence xlf issues the following error:
An external FUNCTION of derived type must be of a sequence derived type or of a derived type which is use associated.
is g95 wrong to ignore that? if yes, will gfortran catch it?
Dominique