[fortran-experiments] Status of the two regressions

FX Coudert fxcoudert@gmail.com
Mon May 7 22:03:00 GMT 2007


Hi all,

With the up-to-date fortran-experiments branch, we have currently two  
regressions in the testsuite. The good news is: they're due to the  
same problem, an issue with rank evaluation. The following reduced  
testcase clearly show the problem:

> $ cat result_in_spec_1.f90
>   print *, shape(test())
> contains
>   character(len=1) function test() result(r)
>     dimension r(1)
>   end function test
> end
> $ gfortran result_in_spec_1.f90
> result_in_spec_1.f90: In function ‘MAIN__’:
> result_in_spec_1.f90:1: fatal error: gfc_todo: Not Implemented:  
> Unable to determine rank of expression

This problems does not happen on mainline (and it's not a recent fix,  
because it already worked with 4.1.2). There are a few old PRs with  
this same error message, but I don't think any of those is really a  
duplicate. We have probably a resolution problem because the  
following, slightly modified, testcase works on the branch:

> $ cat a.f90
>   print *, shape(test())
> contains
>   function test() result(r)
>     character(len=1), dimension(1) :: r
>   end function test
> end
> $ gfortran a.f90 && ./a.out
>            1

I hope this can help Christopher (or anyone else who looks into it)  
to fix these regressions. I post it here in the hope that it rings a  
bell with another of the gfortran maintainers... (Paul, maybe? you're  
our resident resolution expert!)

FX



More information about the Fortran mailing list