[Fortran,Patch] PR 45170 - Implement parsing/resolution of character deferred type parameter
Tobias Burnus
burnus@net-b.de
Tue Nov 2 09:09:00 GMT 2010
*PING*
I updated the patch by removing the match_type_spec part and the
gfortran.dg/allocate_derived_1.f90 change as those changes were applied
as part of Steve's patch at
http://gcc.gnu.org/ml/fortran/2010-10/msg00285.html
Otherwise, the patch is unchanged. Rediff attached. I have rebuild the
patch and will regtest it, but I do not expect any failures.
OK for the trunk?
Tobias
On 10/23/2010 10:04 PM, Tobias Burnus 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: char-deferred-type-param2.diff
Type: text/x-patch
Size: 14267 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20101102/bd213bff/attachment.bin>
More information about the Fortran
mailing list