[Bug fortran/64958] Warn if INTENT(IN) is changed by passing to no-intent argument

2019-06-28 Thread mark.eggleston at codethink dot com
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:

[Bug fortran/64958] Warn if INTENT(IN) is changed by passing to no-intent argument

2019-06-25 Thread tkoenig at gcc dot gnu.org
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,

[Bug fortran/64958] Warn if INTENT(IN) is changed by passing to no-intent argument

2019-06-25 Thread mark.eggleston at codethink dot com
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(

[Bug fortran/64958] Warn if INTENT(IN) is changed by passing to no-intent argument

2019-06-25 Thread dominiq at lps dot ens.fr
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.

[Bug fortran/64958] Warn if INTENT(IN) is changed by passing to no-intent argument

2019-06-25 Thread mark.eggleston at codethink dot com
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

[Bug fortran/64958] Warn if INTENT(IN) is changed by passing to no-intent argument

2015-03-06 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64958 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug fortran/64958] Warn if INTENT(IN) is changed by passing to no-intent argument

2015-02-06 Thread tkoenig at gcc dot gnu.org
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

[Bug fortran/64958] Warn if INTENT(IN) is changed by passing to no-intent argument

2015-02-06 Thread burnus at gcc dot gnu.org
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

[Bug fortran/64958] Warn if INTENT(IN) is changed by passing to no-intent argument

2015-02-06 Thread tkoenig at gcc dot gnu.org
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

[Bug fortran/64958] Warn if INTENT(IN) is changed by passing to no-intent argument

2015-02-06 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64958 Thomas Koenig changed: What|Removed |Added Version|unknown |5.0 Severity|normal