Debian Codegraph @

gcc/testsuite/gfortran.dg/pointer_check_11.f90

raw
1 ! { dg-do run }
2 ! { dg-options "-fcheck=all" }
3 !
4 ! { dg-shouldfail "Pointer check" }
5 ! { dg-output "Fortran runtime error: Pointer actual argument 'y' is not associated" }
6 !
7 !
8 ! PR fortran/50718
9 !
10 ! Was failing (ICE) with -fcheck=pointer if the dummy had the value attribute.
11
12 type t
13 integer :: p
14 end type t
15
16 type(t), pointer :: y => null()
17
18 call sub(y) ! Invalid: Nonassociated pointer
19
20 contains
21 subroutine sub (x)
22 type(t), value :: x
23 end subroutine
24 end