.\" Copyright (c) 1995-1997 Free Software Foundation -*-Text-*- .\" See section COPYING for conditions for redistribution .\" FIXME: no info here on predefines. Should there be? extra for F77... .TH G77 1 "1998-04-17" "GNU Tools" "GNU Tools" .de BP .sp .ti \-.2i \(** .. .SH NAME g77 \- GNU project Fortran Compiler (v0.5.23) .SH SYNOPSIS .RB g77 " [" \c .IR option " | " "filename " ].\|.\|. .SH WARNING The information in this man page is an extract from the full documentation of the GNU Fortran compiler (version 0.5.23), and is limited to the meaning of some of the options. .PP This man page is not up to date, since no volunteers want to maintain it. If you find a discrepancy between the man page and the software, please check the Info file, which is the authoritative documentation. .\" .PP .\" The version of GNU Fortran documented by the Info file is 0.5.23, .\" which includes substantial improvements and changes since 0.5.23, .\" the version documented in this man page. .PP If we find that the things in this man page that are out of date cause significant confusion or complaints, we will stop distributing the man page. The alternative, updating the man page when we update the Info file, is impractical because the rest of the work of maintaining GNU Fortran leaves us no time for that. The GNU project regards man pages as obsolete and should not let them take time away from other things. .PP For complete and current documentation, refer to the Info file `\|\c .B g77\c \&\|' or the manual .I Using and Porting GNU Fortran (for version 0.5.23)\c \&. Both are made from the Texinfo source file .BR g77.texi . .PP If your system has the `\|\c .B info\c \&\|' command installed, the command `\|\c .B info g77\c \&\|' should work, unless .B g77 has not been properly installed. If your system lacks `\|\c .B info\c \&\|', or you wish to avoid using it for now, the command `\|\c .B more /usr/info/g77.info*\c \&\|' should work, unless .B g77 has not been properly installed. .PP If .B g77 has not been properly installed, so that you cannot easily access the Info file for it, ask your system administrator, or the installer of .B g77 (if you know who that is) to fix the problem. .SH DESCRIPTION The C and F77 compilers are integrated; .B g77 is a program to call .B gcc with options to recognize programs written in Fortran (ANSI FORTRAN 77, also called F77). .B gcc processes input files through one or more of four stages: preprocessing, compilation, assembly, and linking. This man page contains full descriptions for .I only F77-specific aspects of the compiler, though it also contains summaries of some general-purpose options. For a fuller explanation of the compiler, see .BR gcc ( 1 ). For complete documentation on GNU Fortran, type `\|\c .B info g77\c \&\|'. F77 source files use the suffix `\|\c .B .f\c \&\|' or `\|\c .B .for\c \&\|'; F77 files to be preprocessed by .BR cpp ( 1 ) use the suffix `\|\c .B .F\c \&\|' or `\|\c .B .fpp\c \&\|'; Ratfor source files use the suffix `\|\c .B .r\c \&\|' (though .B ratfor itself is not supplied as part of .B g77\c \&). .SH OPTIONS There are many command-line options, including options to control details of optimization, warnings, and code generation, which are common to both .B gcc and .B g77\c \&. For full information on all options, see .BR gcc ( 1 ). Options must be separate: `\|\c .B \-dr\c \&\|' is quite different from `\|\c .B \-d \-r \&\|'. Most `\|\c .B \-f\c \&\|' and `\|\c .B \-W\c \&\|' options have two contrary forms: .BI \-f name and .BI \-fno\- name\c \& (or .BI \-W name and .BI \-Wno\- name\c \&). Only the non-default forms are shown here. .TP .B \-c Compile or assemble the source files, but do not link. The compiler output is an object file corresponding to each source file. .TP .BI \-D macro Define macro \c .I macro\c \& with the string `\|\c .B 1\c \&\|' as its definition. .TP .BI \-D macro = defn Define macro \c .I macro\c \& as \c .I defn\c \&. .TP .B \-E Stop after the preprocessing stage; do not run the compiler proper. The output is preprocessed source code, which is sent to the standard output. .TP .B \-g Produce debugging information in the operating system's native format (for DBX or SDB or DWARF). GDB also can work with this debugging information. On most systems that use DBX format, `\|\c .B \-g\c \&\|' enables use of extra debugging information that only GDB can use. Unlike most other Fortran compilers, GNU Fortran allows you to use `\|\c .B \-g\c \&\|' with `\|\c .B \-O\c \&\|'. The shortcuts taken by optimized code may occasionally produce surprising results: some variables you declared may not exist at all; flow of control may briefly move where you did not expect it; some statements may not be executed because they compute constant results or their values were already at hand; some statements may execute in different places because they were moved out of loops. Nevertheless it proves possible to debug optimized output. This makes it reasonable to use the optimizer for programs that might have bugs. .TP .BI "\-I" "dir"\c \& Append directory \c .I dir\c \& to the list of directories searched for include files. .TP .BI "\-L" "dir"\c \& Add directory \c .I dir\c \& to the list of directories to be searched for `\|\c .B \-l\c \&\|'. .TP .BI \-l library\c \& Use the library named \c .I library\c \& when linking. .TP .B \-nostdinc Do not search the standard system directories for header files. Only the directories you have specified with .B \-I options (and the current directory, if appropriate) are searched. .TP .B \-O Optimize. Optimizing compilation takes somewhat more time, and a lot more memory for a large function. See the GCC documentation for further optimisation options. Loop unrolling, in particular, may be worth investigating for typical numerical Fortran programs. .TP .BI "\-o " file\c \& Place output in file \c .I file\c \&. .TP .B \-S Stop after the stage of compilation proper; do not assemble. The output is an assembler code file for each non-assembler input file specified. .TP .BI \-U macro Undefine macro \c .I macro\c \&. .TP .B \-v Print (on standard error output) the commands executed to run the stages of compilation. Also print the version number of the compiler driver program and of the preprocessor and the compiler proper. The version numbers of g77 itself and the GCC distribution on which it is based are distinct. .TP .B \-Wall Issue warnings for conditions which pertain to usage that we recommend avoiding and that we believe is easy to avoid, even in conjunction with macros. .PP .SH FILES .ta \w'LIBDIR/g77\-include 'u file.h C header (preprocessor) file .br file.f Fortran source file .br file.for Fortran source file .br file.F preprocessed Fortran source file .br file.fpp preprocessed Fortran source file .br file.r Ratfor source file (ratfor not included) .br file.s assembly language file .br file.o object file .br a.out link edited output .br \fITMPDIR\fR/cc\(** temporary files .br \fILIBDIR\fR/cpp preprocessor .br \fILIBDIR\fR/f771 compiler .br \fILIBDIR\fR/libf2c.a Fortran run-time library .br \fILIBDIR\fR/libgcc.a GCC subroutine library .br /lib/crt[01n].o start-up routine .br /lib/libc.a standard C library, see .IR intro (3) .br /usr/include standard directory for .B #include files .br \fILIBDIR\fR/include standard gcc directory for .B #include .br files. .sp .I LIBDIR is usually .B /usr/local/lib/\c .IR machine / version . .sp .I TMPDIR comes from the environment variable .B TMPDIR (default .B /usr/tmp if available, else .B /tmp\c \&). .SH "SEE ALSO" gcc(1), cpp(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1). .br .RB "`\|" g77 "\|', `\|" gcc "\|', `\|" cpp "\|'," .RB "`\|" as "\|', `\|" ld "\|'," and .RB "`\|" gdb "\|'" entries in .B info\c \&. .br .I Using and Porting GNU Fortran (for version 0.5.23)\c , James Craig Burley; .I Using and Porting GNU CC (for version 2.0)\c , Richard M. Stallman; .I The C Preprocessor\c , Richard M. Stallman; .I Debugging with GDB: the GNU Source-Level Debugger\c , Richard M. Stallman and Roland H. Pesch; .I Using as: the GNU Assembler\c , Dean Elsner, Jay Fenlason & friends; .I gld: the GNU linker\c , Steve Chamberlain and Roland Pesch. .SH BUGS For instructions on how to report bugs, type `\|\c .B info g77 -n Bugs\c \&\|'. .SH COPYING Copyright (c) 1991-1998 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. .PP Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. .PP Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. .SH AUTHORS See the GNU CC Manual for the contributors to GNU CC. See the GNU Fortran Manual for the contributors to GNU Fortran.