https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64958
--- Comment #9 from MarkEggleston ---
using -Wimplicit-interface helps:
7 | call dusty(n)
| 1
Warning: Procedure 'dusty' called with an implicit interface at (1)
[-Wimplicit-interface]
Adding in an interface block:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64958
--- Comment #8 from Thomas Koenig ---
As long as we use a single file, it would be possible to
warn about this.
What we could do is to analyze dusty and check that its argument
n may be redefined. If it appears in a variable definition
context,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64958
--- Comment #7 from MarkEggleston ---
(In reply to Dominique d'Humieres from comment #6)
> > Warning is output by gfortran 6.3.0.
> > ...
>
> Not a warning, but an error as it shall. This PR is different: it is about
> the case where the INTENT(
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64958
--- Comment #6 from Dominique d'Humieres ---
> Warning is output by gfortran 6.3.0.
> ...
Not a warning, but an error as it shall. This PR is different: it is about the
case where the INTENT(IN) is obfuscated by a subroutine.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64958
--- Comment #5 from MarkEggleston ---
Warning is output by gfortran 6.3.0.
program test
implicit none
integer :: b
integer :: c
b = 0
c = 7
call sub(b)
call sub(c)
write(*,*) b, c
contains
subroutine sub(x)
integer, inte
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64958
Dominique d'Humieres changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64958
--- Comment #3 from Thomas Koenig ---
If it is forbidden to modify an actual argument, we could make
a tempoary copy of that argument, pass that to a procedure where
it maches an intent(unknown) dummy argument, then do the comparison.
So, we wou
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64958
Tobias Burnus changed:
What|Removed |Added
CC||burnus at gcc dot gnu.org
--- Comment #2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64958
--- Comment #1 from Thomas Koenig ---
If this mechanism is in place, it could also be used to catch code like
call foo(a+1)
...
subroutine foo(a)
a = a + 1
end subroutine
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64958
Thomas Koenig changed:
What|Removed |Added
Version|unknown |5.0
Severity|normal
10 matches
Mail list logo