1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
6 real, intent(in out
), target
:: x
14 ! This is a valid assignment, not a statement function.
15 ! Every other Fortran compiler misinterprets it!
16 rpf(x
) = 2. ! statement function or indirect assignment?
20 !PORTABILITY: Name 'rf' from host scope should have a type declaration before its local statement function definition
25 !ERROR: 'sf' has not been declared as an array or pointer-valued function
29 !ERROR: Recursive call to 'f' requires a distinct RESULT in its declaration
30 !ERROR: Left-hand side of assignment is not definable
31 !BECAUSE: 'f()' is not a variable or pointer
32 f() = 1. ! statement function of same name as function
34 function g() result(r
)
35 !WARNING: Name 'g' from host scope should have a type declaration before its local statement function definition
36 !ERROR: 'g' is already declared in this scoping unit
37 g() = 1. ! statement function of same name as function
39 function h1() result(r
)
40 !ERROR: 'r' is not a callable procedure
41 r() = 1. ! statement function of same name as function result
43 function h2() result(r
)
44 procedure(real), pointer :: r
45 r() = 1. ! not a statement function