[Patch, fortran] PR44265 - Link error with reference to parameter array in specification expression
Dominique d'Humières
dominiq@lps.ens.fr
Wed Nov 9 21:06:00 GMT 2016
> Le 9 nov. 2016 à 20:09, Paul Richard Thomas <paul.richard.thomas@gmail.com> a écrit :
>
> Dear Dominique,
>
> I am deeply embarrassed. This is the consequence of an additional
> condition added at the last minute.
No reason to be embarrassed;-)
> The attached removes it and makes sure that the original bug is tested
> in char_result_14.f90. The ChangeLogs are the same.
>
> OK for trunk?
IMO yes
>
> Paul
>
I have a last glitch (which can be deferred if needed):
FUNCTION Get(i) RESULT(s)
CHARACTER(*), PARAMETER :: names(3) = [ &
'Apple ', &
'Orange ', &
'Mango ' ];
INTEGER, INTENT(IN) :: i
CHARACTER(LEN_TRIM(names(i))) :: s
!****
s = names(i)
print *, len(s)
END FUNCTION Get
PROGRAM WheresThatbLinkingConstantGone
IMPLICIT NONE
interface
FUNCTION Get(i) RESULT(s)
CHARACTER(*), PARAMETER :: names(3) = [ &
'Apple ', &
'Orange ', &
'Mango ' ];
INTEGER, INTENT(IN) :: i
CHARACTER(LEN_TRIM(names(i))) :: s
END FUNCTION Get
end interface
integer :: i
i = len(Get(1))
print *, i
END PROGRAM WheresThatbLinkingConstantGone
does not link.
Dominique
More information about the Fortran
mailing list