PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_comp_32.f90
blobc1d01c52712220c9e1a8c9033e91dc8c399ddf57
1 ! { dg-do compile }
3 ! PR 48095: [OOP] Invalid assignment to procedure pointer component not rejected
5 ! Contributed by Arjen Markus <arjen.markus895@gmail.com>
7 module m
9 implicit none
11 type :: rectangle
12 procedure(get_area), pointer :: get_special_area
13 end type rectangle
15 abstract interface
16 real function get_area( this )
17 import :: rectangle
18 class(rectangle), intent(in) :: this
19 end function get_area
20 end interface
22 contains
24 real function get_my_area( this )
25 type(rectangle), intent(in) :: this
26 get_my_area = 3.0
27 end function get_my_area
29 end module
32 use m
33 type(rectangle) :: rect
34 rect%get_special_area => get_my_area ! { dg-error "Interface mismatch in procedure pointer assignment" }
35 end