File: implicit_call_02.f90

package info (click to toggle)
lfortran 0.61.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 61,892 kB
  • sloc: cpp: 181,767; f90: 92,175; python: 17,616; ansic: 10,170; yacc: 2,377; sh: 1,444; fortran: 892; makefile: 38; javascript: 15
file content (16 lines) | stat: -rw-r--r-- 431 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
! Test: Array kind mismatch via implicit interface
! With --implicit-interface --implicit-argument-casting, passing integer(8)
! array to integer(4) parameter should produce semantic error.
program implicit_call_02
    implicit none
    integer(8) :: arr(2)
    arr(1) = 100
    arr(2) = 200
    call test_sub(arr)
end program

subroutine test_sub(x)
    implicit none
    integer(4) :: x(2)
    print *, x(1), x(2)
end subroutine