1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
2 subroutine test(dp1
, dp2
)
5 elemental
real function elemental(x
)
8 pure
real function nonelemental(x
)
12 !PORTABILITY: A dummy procedure should not have an ELEMENTAL intrinsic as its interface
14 !ERROR: A dummy procedure may not be ELEMENTAL
15 procedure(elemental
) :: dp2
16 !PORTABILITY: Procedure pointer 'pp1' should not have an ELEMENTAL intrinsic as its interface
17 procedure(sin
), pointer :: pp1
18 !ERROR: Procedure pointer 'pp2' may not be ELEMENTAL
19 procedure(elemental
), pointer :: pp2
20 procedure(elemental
) :: pp3
! ok, external
21 procedure(nonelemental
), pointer :: pp4
=> sin
! ok, special case
22 !ERROR: Procedure pointer 'pp5' cannot be initialized with the elemental procedure 'elemental'
23 procedure(nonelemental
), pointer :: pp5
=> elemental