[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-patches
Subject:    Re: [Patch, fortran] PR65677 - Incomplete assignment on deferred-length character variable
From:       Dominique_d'Humières <dominiq () lps ! ens ! fr>
Date:       2018-09-30 17:16:13
Message-ID: 9E853743-7B5F-4EE8-8B22-4C1C94E024BD () lps ! ens ! fr
[Download RAW message or body]

Hi Paul,

First your patch has been committed with wrong entry: 65667 instead of 65677.

Second, I suspect it is responsible of the following ICE:

% gfc pr72755.f90 -fno-range-check
pr72755.f90:1485:0:

1485 |   this%buffer = transfer( c(start:iend), this%buffer )
     | 
internal compiler error: in gfc_dep_resolver, at fortran/dependency.c:2257

and

% gfc pr64125_db.f90
pr64125_db.f90:20:0:

20 |   left%chars = transfer( right, left%chars )
   | 
internal compiler error: in gfc_dep_resolver, at fortran/dependency.c:2257

for

module test
type t_string
  private
  character(len=:), allocatable :: chars
end type t_string

contains

pure subroutine string_assign_from_array( left, right )

! The target string
  type(t_string), intent(out) :: left

! The source string
  character, dimension(:), intent(in) :: right


! Copy memory
  allocate( character(len=size(right)) :: left%chars )
  left%chars = transfer( right, left%chars )

end subroutine string_assign_from_array

end module test

Cheers,

Dominique

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic