2 ! { dg-options "-fcheck=all" }
3 ! { dg-shouldfail "above upper bound" }
9 implicit none (type, external)
13 procedure
, public
:: fun
=> fun_par
17 class(par
), allocatable
:: p
21 type(comp
), allocatable
:: m(:)
26 function fun_par(this
)
32 subroutine update_foo(this
)
34 write(*,*) this
%m(1)%p
%fun()
35 end subroutine update_foo
37 subroutine bad_update_foo(this
)
39 write(*,*) this
%m(2)%p
%fun()
40 end subroutine bad_update_foo
45 implicit none (type, external)
50 call bad_update_foo(x
)
53 ! { dg-output "At line 39 of file .*pr92050.f90.*Fortran runtime error: Index '2' of dimension 1 of array 'this%m' above upper bound of 1" }