This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compiler Options


On 7/5/2011 11:46 AM, jamesburgess_91 wrote:

I'm trying to compile and link some fortran 77 code with gfortran that was originally compiled with an HP 77 compiler.

There are some compiler and linker options that had been used with the hp
compiler that I cannot find equivalents of with gfortran.

If anyone can tell me an equivalent compiler option in gfortran for any of
these hp options it would be greatly appreciated:

-U Uses uppercase for external names (default is lowercase).

-C   Turns on bounds checking for subscript and substring expressions.  This
is the same as specifying the $RANGE ON directive in all source files.

+U   Causes the compiler to distinguish between uppercase and lowercase
characters within user-defined names.  When using +U, specify FORTRAN
intrinsic names in all uppercase so as not to conflict with case-sensitive
user or library function names.  For example, "ABS" specifies the FORTRAN
absolute value intrinsic, while "abs" could be used to call the standard C
library absolute value function abs(3c).  The default is to convert external
names to lowercase.

+A3  Uses the Series 300/400 C and Pascal data-alignment algorithm.  This is
the default algorithm.  The same effect can be achieved using the
$HP9000_300 ALIGNMENT directive.

+E1 Enables access of non-standard system subroutines.  Causes the linker to
access the extended libraries.  This is the same as linking with the
libFext.a library, which contains non-standard system subroutines.  This
option has the same effect as the $NOSTANDARD SYSTEM compiler directive.

I don't know much about compiler details and am just trying to get the code
to compile and link.  If some of these options are just optional and don't
affect whether or not the code will compile, that knowledge would also be
appreciated.
There are references on several of these questions which are fairly easily found by web search, which may give better background than you would get by us guessing why you ask these questions.
For example, you don't tell us what OS or flavor(s) of gfortran you are interested in, so it seems best to avoid answers which deal with non-portable features (although you seem to want them). Are you trying to support the HP 9000_300 with gfortran, or to run on more recent hardware? If the latter, you probably can ignore those options.
For -C, you probably should look up -fbounds-check.
gfortran includes most of the "non-standard system subroutines" which were in g77, probably including many of those you use, without requiring an additional library at link time. Some you are probably better off replacing with current standard Fortran intrinsics.


--
Tim Prince


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]