[Bug fortran/69474] ICE: tree check:=?UTF-8?Q?=20expected=20class=20=E2=80=98expression=E2=80=99?=,=?UTF-8?Q?=20have=20=E2=80=98declaration=E2=80=99=20?=(var_decl) in tree_operand_check, at tree.h:3504
gerhard.steinmetz.fortran@t-online.de
gcc-bugzilla@gcc.gnu.org
Mon Jan 25 18:11:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69474
--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
$ gfortran-5.3.1 -c z1.f90
z1.f90:19:0:
z(1:n) = x([(i, i=n,1,-1)])
^
internal compiler error: Segmentation fault
---
These assignment variants are accepted :
$ cat z2.f90
module m
type t
real :: a
contains
procedure :: f
generic :: assignment(=) => f
end type
contains
impure elemental subroutine f (y, x)
class(t), intent(out) :: y
class(t), intent(in) :: x
y%a = x%a
end
subroutine s (x, z)
class(t), allocatable :: x(:)
class(t), allocatable :: z(:)
integer :: i, n
n = size(x)
z = x
z = x(1:n)
z(1:n) = x
z = x([(i, i=n,1,-1)])
end
end
More information about the Gcc-bugs
mailing list