[Bug fortran/87980] ICE in gfc_conv_descriptor_data_get, at fortran/trans-array.c for assignment on allocatable polymorphic variable
gscfq@t-online.de
gcc-bugzilla@gcc.gnu.org
Tue Sep 17 19:13:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87980
--- Comment #6 from G. Steinmetz <gscfq@t-online.de> ---
Variants that actually compile :
$ cat z3.f90 # with a scalar, x(:) -> x
module m
type t
contains
procedure :: f => g
end type
contains
subroutine g (z, x)
class(t) :: z
class(t), optional :: x
end
subroutine s (z, x)
class(t) :: z
class(t), optional :: x
if ( present(x) ) call z%f(x)
end
end
$ cat z4.f90 # without optional
module m
type t
contains
procedure :: f => g
end type
contains
subroutine g (z, x)
class(t) :: z
class(t), optional :: x
end
subroutine s (z, x)
class(t) :: z
class(t) :: x(:)
call z%f(x(1))
end
end
More information about the Gcc-bugs
mailing list