36 lines · plain
1!RUN: %flang_fc1 -fsyntax-only -J%S/Inputs %s2 3#if 04!modfile67.mod was produced from this source, and must be read into this5!compilation from its module file in order to truly test this fix.6module modfile677 type t8 procedure(foo), nopass, pointer :: p9 end type10 contains11 pure function foo(n,a) result(r)12 integer, intent(in) :: n13 real, intent(in), dimension(n) :: a14 logical, dimension(size(a)) :: r15 r = .false.16 end17 type(t) function fooptr(f)18 procedure(foo) f19 fooptr%p => f20 end21end22#endif23 24program test25 use modfile6726 type(t) x27 x = fooptr(bar) ! ensure no bogus error about procedure incompatibility28 contains29 pure function bar(n,a) result(r)30 integer, intent(in) :: n31 real, intent(in), dimension(n) :: a32 logical, dimension(size(a)) :: r33 r = .false.34 end35end36