Debian Codegraph @

gcc/testsuite/gfortran.dg/proc_decl_26.f90

raw
1 ! { dg-do compile }
2 !
3 ! PR 35831: [F95] Shape mismatch check missing for dummy procedure argument
4 !
5 ! Contributed by Tobias Burnus <[email protected]>
6
7 program test
8
9 implicit none
10
11 interface
12 subroutine one(a)
13 integer a(:)
14 end subroutine
15 subroutine two(a)
16 integer a(2)
17 end subroutine
18 end interface
19
20 call foo(two) ! { dg-error "Shape mismatch in argument" }
21 call bar(two) ! { dg-error "Shape mismatch in argument" }
22
23 contains
24
25 subroutine foo(f1)
26 procedure(one) :: f1
27 end subroutine foo
28
29 subroutine bar(f2)
30 interface
31 subroutine f2(a)
32 integer a(:)
33 end subroutine
34 end interface
35 end subroutine bar
36
37 end program