2014-07-12 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_comp_31.f90
blobe0e528be28b07433e67f098e7093930fc44d367b
1 ! { dg-do compile }
3 ! PR 47768: printing a derived-type variable with proc-pointer components
5 ! Contributed by Arjen Markus <arjen.markus895@gmail.com>
7 module proc_pointers
8 implicit none
9 type :: rectangle
10 real :: width, height
11 procedure(real), pointer, nopass :: get_special_area
12 end type
13 end module
15 program test_objects
16 use proc_pointers
17 implicit none
18 type(rectangle) :: rect
19 write(*,*) rect ! { dg-error "cannot have procedure pointer components" }
20 end program