blob: 6a5d8c967e20a93ee36ea0f1ac9ea45bdbd6c92a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
! { dg-do compile }
!
! PR 47768: printing a derived-type variable with proc-pointer components
!
! Contributed by Arjen Markus <arjen.markus895@gmail.com>
module proc_pointers
implicit none
type :: rectangle
real :: width, height
procedure(real), pointer, nopass :: get_special_area
end type
end module
program test_objects
use proc_pointers
implicit none
type(rectangle) :: rect
write(*,*) rect ! { dg-error "cannot have procedure pointer components" }
end program
! { dg-final { cleanup-modules "proc_pointers" } }
|