[Bug fortran/61069] Gfortran allows functions to be called as subroutines when defined in a separate source file

2014-05-06 Thread tristanmoody at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61069 --- Comment #9 from Tristan Moody --- (In reply to Steve Kargl from comment #8) > program foo > integer i > external bar, baz > i=0 > call bar(i) > call baz(i) > end > > This is standard conforming Fortran. When gfortran compiles

[Bug fortran/61069] Gfortran allows functions to be called as subroutines when defined in a separate source file

2014-05-06 Thread sgk at troutmask dot apl.washington.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61069 --- Comment #8 from Steve Kargl --- On Tue, May 06, 2014 at 06:17:42PM +, tristanmoody at gmail dot com wrote: > (In reply to Steve Kargl from comment #5) > > The Fortran code conforms to the Fortran standard! Why do you continue to > > claim

[Bug fortran/61069] Gfortran allows functions to be called as subroutines when defined in a separate source file

2014-05-06 Thread tristanmoody at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61069 --- Comment #7 from Tristan Moody --- (In reply to Steve Kargl from comment #5) > The Fortran code conforms to the Fortran standard! Why do you continue to > claim that it is nonconforming invalid code. What the linker does to > the object code

[Bug fortran/61069] Gfortran allows functions to be called as subroutines when defined in a separate source file

2014-05-06 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61069 Andrew Pinski changed: What|Removed |Added Resolution|INVALID |WONTFIX --- Comment #6 from Andrew Pinski

[Bug fortran/61069] Gfortran allows functions to be called as subroutines when defined in a separate source file

2014-05-06 Thread sgk at troutmask dot apl.washington.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61069 --- Comment #5 from Steve Kargl --- On Tue, May 06, 2014 at 03:41:13PM +, tristanmoody at gmail dot com wrote: > > I concede this point: the standard only specifies that the compiler catch > nonconforming code within individual program units

[Bug fortran/61069] Gfortran allows functions to be called as subroutines when defined in a separate source file

2014-05-06 Thread kargl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61069 kargl at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|

[Bug fortran/61069] Gfortran allows functions to be called as subroutines when defined in a separate source file

2014-05-05 Thread tristanmoody at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61069 --- Comment #2 from Tristan Moody --- Of course the code is invalid. That's the point. The compiler is inconsistent about whether it will catch that fact. This invalid code could easily show up, say, when refactoring a large code base, converting

[Bug fortran/61069] Gfortran allows functions to be called as subroutines when defined in a separate source file

2014-05-05 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61069 --- Comment #1 from Dominique d'Humieres --- Your code is invalid and the compiler can do anything. Note that if you type bar as you should, gfortran complains: ! { dg-do compile } program foo implicit none integer :: i, bar external bar, b