brintos

brintos / llvm-project-archived public Read only

0
0
Text · 610 B · fb5895f Raw
27 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! Ensure that references to functions that return pointers can serve as3! "variables" in actual arguments.  All of these uses are conforming and4! no errors should be reported.5module m6  integer, target :: x = 17 contains8  function get() result(p)9    integer, pointer :: p10    p => x11  end function get12  subroutine increment(n)13    integer, intent(inout) :: n14    n = n + 115  end subroutine increment16end module m17 18use m19integer, pointer :: q20get() = 221call increment(get())22q => get()23read(*) get()24open(file='file',newunit=get())25allocate(q,stat=get())26end27