Skip to content

Catch assignment to INTENT(IN) dummy arguments #6

@ppenzin

Description

@ppenzin

Fort does not catch assignment to dummy arguments marked INTENT(IN):

$ cat intent.f95 
subroutine s(x)
  integer, intent(in) :: x
  x = x + 1
end subroutine
program p
  call s(1)
end program
$ fort -fsyntax-only intent.f95
$ gfortran -fsyntax-only intent.f95
intent.f95:3:2:

   x = x + 1
  1
Error: Dummy argument 'x' with INTENT(IN) in variable definition context (assignment) at (1)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions