https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69474
Bug ID: 69474 Summary: ICE: tree check: expected class ‘expression’, have ‘declaration’ (var_decl) in tree_operand_check, at tree.h:3504 Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- $ gfortran-6 --version GNU Fortran (SUSE Linux) 6.0.0 20160121 (experimental) [trunk revision 232670] $ cat z1.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(1:n) = x([(i, i=n,1,-1)]) end end $ gfortran-6 -c z1.f90 z1.f90:19:0: z(1:n) = x([(i, i=n,1,-1)]) internal compiler error: tree check: expected class ‘expression’, have ‘declaration’ (var_decl) in tree_operand_check, at tree.h:3504