Yes, but you need to compile everything with a Fortran 90 compiler.
Which esentially turns the question into a trivial one: Almost all
FORTRAN 77 code is valid Fortran 90.
So if you compile the various source files with a Fortran 90 compiler,
there is no
problem whatsoever.
But perhaps you have something else in mind?
Regards,
Arjen
Arjen's answer is correct. But, if by "F90 subroutine" you
mean a subroutine that uses some of the new F90 features, such
as assumed shape arrays, then the F90 subroutine will need an
explicit interface. The only practical way to get an interface
is to put the F90 subroutine in a module and USE it from the
f77 code. This effectively turns the f77 code into F90 code.
If the F90 routine doesn't use any of the new features, then
you don't need an interface. But, if you are going to use
some F90 subroutines, then you might as well go all the way
and convert your f77 code into F90. It's essentially trivial
to start using modules and then you will get the benefit of
enhanced error checking for subroutine calls.
Dick Hendrickson
Depends if you are using an F77 compiler or an F90 compiler.
It depends on the compilers used. In general, mixing
codes compiled with different Fortran compilers does
not work because of differences in the associated
run-time systems. Some Fortran 90/95/2003 compilers
are compatible with earlier FORTRAN 77 compilers.
Robert Corbett