[Patch, fortran] PR31154 , PR31229 and PR33334 - use associated or imported function characteristics.
Dominique Dhumieres
dominiq@lps.ens.fr
Sat Sep 29 19:40:00 GMT 2007
> 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
More information about the Fortran
mailing list