This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Fortran, patch, pr78053, v1] [OOP] SELECT TYPE on CLASS(*) component for deferred length char arrays ICEs for -O > 0
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Andre Vehreschild <vehre at gmx dot de>
- Cc: GCC-Patches-ML <gcc-patches at gcc dot gnu dot org>, GCC-Fortran-ML <fortran at gcc dot gnu dot org>
- Date: Tue, 25 Oct 2016 17:57:25 +0200
- Subject: Re: [Fortran, patch, pr78053, v1] [OOP] SELECT TYPE on CLASS(*) component for deferred length char arrays ICEs for -O > 0
- Authentication-results: sourceware.org; auth=none
- References: <20161024184809.470a1dc7@vepi2>
Hi Andre,
This patch is fine, apart from
s/whose length is no consistently/whose length is not consistently/
in the comment.
The testcase in comment #1 of PR78053 is invalid and now give the
correct message:
type is (character(len=:))
1
Error: The type-spec at (1) shall specify that each length type
parameter is assumed
Is this tested anywhere?
OK for trunk and, although not a regression, for 6-branch.
Cheers
Paul
On 24 October 2016 at 18:48, Andre Vehreschild <vehre@gmx.de> wrote:
> Hi all,
>
> attached patch fixes an ICE in gfortran when an unlimited polymorphic entity
> was used to store a char array of deferred/assumed length. The patch typedefs
> the necessary type now copying the behavior from
> trans-array.c::gfc_trans_create_temp_array().
>
> Furthermore does the patch now consequently set the _vptr->_size to the
> character kind of the char array and the _len component to the length of the
> string independent of whether the char array was declared deferred or with a
> len given.
>
> Bootstraps and regtests ok on x86_64-linux/F23. Ok for trunk?
>
> Regards,
> Andre
> --
> Andre Vehreschild * Email: vehre ad gmx dot de
--
The difference between genius and stupidity is; genius has its limits.
Albert Einstein