1!RUN: %flang_fc1 -fsyntax-only -J%S/Inputs %s 2 3#if 0 4!modfile67.mod was produced from this source, and must be read into this 5!compilation from its module file in order to truly test this fix. 6module modfile67 7 type t 8 procedure(foo), nopass, pointer :: p 9 end type 10 contains 11 pure function foo(n,a) result(r) 12 integer, intent(in) :: n 13 real, intent(in), dimension(n) :: a 14 logical, dimension(size(a)) :: r 15 r = .false. 16 end 17 type(t) function fooptr(f) 18 procedure(foo) f 19 fooptr%p => f 20 end 21end 22#endif 23 24program test 25 use modfile67 26 type(t) x 27 x = fooptr(bar) ! ensure no bogus error about procedure incompatibility 28 contains 29 pure function bar(n,a) result(r) 30 integer, intent(in) :: n 31 real, intent(in), dimension(n) :: a 32 logical, dimension(size(a)) :: r 33 r = .false. 34 end 35end 36