brintos

brintos / llvm-project-archived public Read only

0
0
Text · 883 B · 221a671 Raw
28 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! C1003 - can't parenthesize function call returning procedure pointer3module m14  type :: dt5    procedure(frpp), pointer, nopass :: pp6  end type dt7 contains8  subroutine boring9  end subroutine boring10  function frpp11    procedure(boring), pointer :: frpp12    frpp => boring13  end function frpp14  subroutine tests15    procedure(boring), pointer :: mypp16    type(dt) :: dtinst17    mypp => boring ! legal18    mypp => (boring) ! legal, not a function reference19    !ERROR: A function reference that returns a procedure pointer may not be parenthesized20    mypp => (frpp()) ! C100321    mypp => frpp() ! legal, not parenthesized22    dtinst%pp => frpp23    mypp => dtinst%pp() ! legal24    !ERROR: A function reference that returns a procedure pointer may not be parenthesized25    mypp => (dtinst%pp())26  end subroutine tests27end module m128