[Bug fortran/86468] New: [9.0 regression] ICE verify_gimple failed
juergen.reuter at desy dot de
gcc-bugzilla@gcc.gnu.org
Tue Jul 10 18:43:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86468
Bug ID: 86468
Summary: [9.0 regression] ICE verify_gimple failed
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: juergen.reuter at desy dot de
Target Milestone: ---
The following coarray code from c.l.f. 2016, Nov 16 leads to an ICE:
$ gfortran -fcoarray=single coarr1.f90
coarr1.f90:18:0:
subroutine wrapped_point_add(self, to_add)
Error: non-trivial conversion at assignment
struct array02_integer(kind=4)
struct array01_integer(kind=4)
_36->point = point;
coarr1.f90:18:0: internal compiler error: verify_gimple failed
and here is the code:
module classes
implicit none
private
public :: wrapped_coarray
type :: wrapped_point
integer, allocatable :: point(:)
contains
procedure :: add => wrapped_point_add
end type wrapped_point
type :: wrapped_coarray
type(wrapped_point), allocatable :: caf(:)[:]
end type wrapped_coarray
contains
subroutine wrapped_point_add(self, to_add)
class(wrapped_point), intent(inout) :: self
integer, intent(in) :: to_add
integer, allocatable :: point(:)
integer :: points_number
if (allocated(self%point)) then
points_number = size(self%point, dim=1)
allocate(point(1:points_number+1))
point(1:points_number) = self%point
point(points_number+1) = to_add
call move_alloc(from=point, to=self%point)
else
allocate(self%point(1))
self%point(1) = to_add
end if
end subroutine wrapped_point_add
end module classes
program test
use classes
implicit none
type(wrapped_coarray) :: foo
allocate(foo%caf(99)[*])
call foo%caf(32)%add(this_image())
print*, foo%caf(32)%point
end program test
More information about the Gcc-bugs
mailing list