Hi Paul,

thanks for the review. The typo is corrected and another in the sentences
before that, too. Committed as r241528. I will see whether it make sense and is
possible to backport to gcc-6.

Note the PR78053 is considered a duplicate of pr72770 which now used for
tracking.

About the testcase for "type is (character(len=:))" there seems to be some
difference of where the type is occurs. I think we should investigate further
and check whether a bit more is needed. In my trivial testcase:

  type :: t1
    integer :: i = 42
    class(t1),pointer :: cp
  end type

  class(t1), allocatable :: a

  select type (a)
    type is (character(len=:))
      ;
  end select
end

I get a totally different error message, then the one expected:

select_type_1.f03:10:30: ! 

     type is (character(len=:))
                              1
Error: Entity '__tmp_CHARACTER_0_1' at (1) has a deferred type parameter and
requires either the POINTER or ALLOCATABLE attribute

So a bit more of investigation is needed.

Again thanks for the review.

Regards,
        Andre

On Tue, 25 Oct 2016 17:57:25 +0200
Paul Richard Thomas <paul.richard.tho...@gmail.com> wrote:

> 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 <ve...@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  
> 
> 
> 


-- 
Andre Vehreschild * Email: vehre ad gmx dot de 

Reply via email to