aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/class_array_19.f90
blob: 0b28db180db2fb7d399a39f64e74fb00061cafb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
! { dg-do compile }
!
! PR 57285: [OOP] ICE on invalid: "gfc_array_dimen_size(): Bad dimension" due to SIZE intrinsic with invalid dim on CLASS dummy
!
! Contributed by Lorenz Hüdepohl <bugs@stellardeath.org>

  type type_t
  end type
contains
  subroutine foo(a)
    class(type_t), intent(in) :: a(:)
    type(type_t) :: c(size(a,dim=2))   ! { dg-error "is not a valid dimension index" }
  end subroutine
end