summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr100193.f90
blob: 07a3634cb06325799efe7091dcf50d8cfb6ec894 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! { dg-do compile }
!
! Contributed by Gerhard Steinmetz  <gscfq@t-online.de>
!
module m
   implicit none
   type t
      procedure(f), pointer, nopass :: g
   end type
contains
   function f()
      character(:), allocatable :: f
      f = 'abc'
   end
   subroutine s
      type(t) :: z
      z%g = 'x'  ! { dg-error "is a procedure pointer" }
      if ( z%g() /= 'abc' ) stop
   end
end