[Fortran,Patch] PR 45170 - Implement parsing/resolution of character deferred type parameter

Paul Richard Thomas paul.richard.thomas@gmail.com
Sat Oct 23 22:00:00 GMT 2010


Hah!  I missed this one completely....  I'll come back to you first
thing tomorrow because it saves me a lot of effort.

Thanks to you and Steve.

Paul

On Sat, Oct 23, 2010 at 10:04 PM, Tobias Burnus <burnus@net-b.de> wrote:
> As Paul plans to implement "character(len=:)" support, I thought I should
> update Steve's patch and submit it for review. Steve's posted his patch at
> http://gcc.gnu.org/ml/fortran/2010-08/msg00181.html
>
> The patch does the parsing and resolving of character deferred (length) type
> parameter; after/during resolution, the compiler aborts with a
> not-yet-implemented error.
>
> I have changed some parts around in the patch - and have discovered PR
> fortran/46152 on the way. Note: The bogus error message changes a bit with
> and without this patch applied. That should be the part in match_type_spec.
>
> Build and regtested on x86-64-linux.
> OK for the trunk?
>
> Tobias
>
> PS: Note for the actual implementation: For pointers, the length parameter
> is the one of the target; thus, the length can not be saved in the pointer.
> For example:
>
> character(len=:), allocatable, target :: str
> character(len=:), pointer :: pstr
> pstr => str
> str = "abc"
> if(len(pstr) /= len(str) .or. len(str)/= 3) call abort()
> str = "abcd"
> if(len(pstr) /= len(str) .or. len(str)/= 4) call abort()
> end
>



-- 
The knack of flying is learning how to throw yourself at the ground and miss.
       --Hitchhikers Guide to the Galaxy



More information about the Fortran mailing list