Skip to content

External procedure declared in the same file call with different arguements #46

@ppenzin

Description

@ppenzin

When target of external decalartion is defined in the same source file but with different arguments, compiler should produce a warning but keep going. Example:

$ cat call.f90 
subroutine s(a, b)
  integer, intent(out) :: a
  integer, intent(in)  :: b
  a = b
end subroutine

program p
  real x
  call s(x, 1.5)
end program

$ gfortran -c call.f90
call.f90:9:16:

    9 |   call s(x, 1.5)
      |                1
Warning: Type mismatch in argument 'a' at (1); passed REAL(4) to INTEGER(4) [-Wargument-mismatch
$

Same thing for different number of arguments, not only different types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions