25 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic2subroutine test(dp1, dp2)3 intrinsic sin4 interface5 elemental real function elemental(x)6 real, intent(in) :: x7 end8 pure real function nonelemental(x)9 real, intent(in) :: x10 end11 end interface12 !PORTABILITY: A dummy procedure should not have an ELEMENTAL intrinsic as its interface [-Wportability]13 procedure(sin) :: dp114 !ERROR: A dummy procedure may not be ELEMENTAL15 procedure(elemental) :: dp216 !PORTABILITY: Procedure pointer 'pp1' should not have an ELEMENTAL intrinsic as its interface [-Wportability]17 procedure(sin), pointer :: pp118 !ERROR: Procedure pointer 'pp2' may not be ELEMENTAL19 procedure(elemental), pointer :: pp220 procedure(elemental) :: pp3 ! ok, external21 procedure(nonelemental), pointer :: pp4 => sin ! ok, special case22 !ERROR: Procedure pointer 'pp5' cannot be initialized with the elemental procedure 'elemental'23 procedure(nonelemental), pointer :: pp5 => elemental24end25