brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1000 B · a1ecebf Raw
39 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12 3! Test that the interface of specific intrinsics passed as dummy arguments4! are correctly validated against actual arguments explicit interface.5 6  intrinsic :: abs, dabs7  interface8    subroutine foo(f)9      interface10        function f(x)11          real :: f12          real, intent(in) :: x13        end function14      end interface15    end subroutine16 17    subroutine foo2(f)18      interface19        function f(x)20          double precision :: f21          double precision, intent(in) :: x22        end function23      end interface24    end subroutine25  end interface26 27  ! OK28  call foo(abs)29 30  ! OK31  call foo2(dabs)32 33  !ERROR: Actual procedure argument has interface incompatible with dummy argument 'f=': function results have distinct types: REAL(4) vs REAL(8)34  call foo(dabs)35 36  !ERROR: Actual procedure argument has interface incompatible with dummy argument 'f=': function results have distinct types: REAL(8) vs REAL(4)37  call foo2(abs)38end39