1! RUN: %S/test_errors.sh %s %t %f18
2! C1003 - can't parenthesize function call returning procedure pointer
3module m1
4  type :: dt
5    procedure(frpp), pointer, nopass :: pp
6  end type dt
7 contains
8  subroutine boring
9  end subroutine boring
10  function frpp
11    procedure(boring), pointer :: frpp
12    frpp => boring
13  end function frpp
14  subroutine tests
15    procedure(boring), pointer :: mypp
16    type(dt) :: dtinst
17    mypp => boring ! legal
18    mypp => (boring) ! legal, not a function reference
19    !ERROR: A function reference that returns a procedure pointer may not be parenthesized
20    mypp => (frpp()) ! C1003
21    mypp => frpp() ! legal, not parenthesized
22    dtinst%pp => frpp
23    mypp => dtinst%pp() ! legal
24    !ERROR: A function reference that returns a procedure pointer may not be parenthesized
25    mypp => (dtinst%pp())
26  end subroutine tests
27end module m1
28