program main ! ! Autoconf puts "program main" at the top interface subroutine force_assumed_shape(a, count) integer :: count complex, dimension(:,:) :: a end subroutine force_assumed_shape end interface interface subroutine foo(buffer, count) ! buffer type(*), intent(in) :: buffer integer, intent(in) :: count end subroutine foo end interface ! Simple interface with an un-typed first argument (e.g., a choice buffer) integer :: count real :: buffer1(3) character :: buffer2 complex :: buffer3(4,4) complex, pointer, dimension(:,:) :: ptr target :: buffer3 integer :: buffer4 ptr => buffer3 ! Set some known values (somewhat irrelevant for this test, but just be ! sure that the values are initialized) a = 17 buffer1(1) = 4.5 buffer1(2) = 6.7 buffer1(3) = 8.9 buffer2 = 'a' ! Call with one type for the first argument call foo(buffer1, count) ! Call with a different type for the first argument call foo(buffer2, count) ! Force us through an assumed shape call force_assumed_shape(buffer3, count) ! Force a pointer call through an assumed shape (!) ptr => buffer3 ! Also try with a simple scalar integer ! (Intel 2016 compiler suite only partially supports GCC pragmas; ! they work with all the above buffer types, but fail with a ! simple scalar integer) call foo(buffer4, count) end program subroutine force_assumed_shape(a, count) integer :: count real, dimension(:,:) :: a call foo(a, count) end subroutine force_assumed_shape module check_ignore_tkr interface foobar subroutine foobar_x(buffer, count) ! buffer type(*), intent(in) :: buffer integer, intent(in) :: count end subroutine foobar_x end interface end module subroutine bar(var) use check_ignore_tkr implicit none real, intent(inout) :: var(:, :, :) call foobar(var(1,1,1), 1) ! Autoconf puts "end" after the last line end