coarray_41.f90: Add "-latomic" option if libatomic_available.
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_comp_41.f90
blobe282fc1832d3d454d3e3a17e68693f8a6ba5bab1
1 ! { dg-do compile }
3 ! PR 64508: [F03] interface check missing for procedure pointer component as actual argument
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
7 TYPE :: parent
8 END TYPE
10 TYPE, EXTENDS(parent) :: extension
11 procedure(extension_proc), pointer :: ppc
12 END TYPE
14 CLASS(extension), ALLOCATABLE :: x
15 CALL some_proc(x%ppc) ! { dg-error "Interface mismatch in dummy procedure" }
17 contains
19 SUBROUTINE parent_proc(arg)
20 CLASS(parent), INTENT(IN) :: arg
21 END SUBROUTINE
23 SUBROUTINE extension_proc(arg)
24 CLASS(extension), INTENT(IN) :: arg
25 END SUBROUTINE
28 SUBROUTINE some_proc(proc)
29 PROCEDURE(parent_proc) :: proc
30 TYPE(Parent) :: a
31 CALL proc(a)
32 END SUBROUTINE
34 end