Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch assignment to INTENT(IN) dummy arguments #6

Open
ppenzin opened this issue Dec 25, 2017 · 0 comments
Open

Catch assignment to INTENT(IN) dummy arguments #6

ppenzin opened this issue Dec 25, 2017 · 0 comments

Comments

@ppenzin
Copy link
Contributor

ppenzin commented Dec 25, 2017

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant