Computer History Notes - Herong's Tutorial Notes - v3.13, by Herong Yang
g77 - GNU Project FORTRAN Compiler
This section provides a quick introduction of g77, the GNU Project FORTRAN Compiler. A sample session of compilation, linking and executing a FORTRAN 77 program is also provided.
"g77" is a free and open source compiler for FORTRAN 77 language developed by the GNU project. "g77" is actually a front-end program that calls "gcc", the GNU C Compiler to compile FORTRAN 77 programs.
Here is an interesting compilation, linking and execution session of a FORTRAN 77 program using "g77" on a Linux system:
%cat swap.f
SUBROUTINE SWAP(X, Y, N)
DIMENSION X(*), Y(*)
DO 100 I = 1, N
T = X(I)
X(I) = Y(I)
Y(I) = T
100 CONTINUE
END
%g77 -c swap.f -o swap.o -v
g77 version 0.5.21
gcc -c -xf77 swap.f -o swap.o -v
Reading specs from /usr/lib/gcc-lib/i486.../2.7.2.3/specs
gcc version 2.7.2.3
...
%cat test.f
PROGRAM TEST
DIMENSION A(10), B(10)
M = 7
DO 100 I = 1, M
A(I) = 10.0 + RAND()
B(I) = 20.0 + RAND()
100 CONTINUE
CALL SWAP(A, B, M)
DO 200 I = 1, M
WRITE(6,10) A(I), B(I)
200 CONTINUE
10 FORMAT(2F7.2)
END
%g77 -c testf -o test.o
%g77 test.o swap.o -o test -v
g77 version 0.5.21
gcc -c -xf77 swap.f -o swap.o -v
...
%./test
20.54 10.13
20.58 10.41
20.96 10.17
20.29 10.69
20.11 10.56
20.71 10.82
20.48 10.84
Notice that:
Table of Contents
2002 - .NET Framework Developed by Microsoft
1995 - PHP: Hypertext Preprocessor Created by Rasmus Lerdorf
1995 - Java Language Developed by Sun Microsystems
1991 - WWW (World Wide Web) Developed by Tim Berners-Lee
1991 - Gopher Protocol Created by a University of Minnesota Team
1984 - X Window System Developed a MIT Team
1984 - Macintosh Developed by Apple Inc.
1983 - "Sendmail" Mail Transfer Agent Developed by Eric Allman
1979 - The Tcsh (TENEX C Shell) Developed by Ken Greer
1978 - Bash (Bourne-Again Shell) Developed by Brian Fox
1978 - The C Shell Developed by Bill Joy
1977 - The Bourne Shell Developed by Stephen Bourne
1977 - Apple II Designed by Steve Jobs and Steve Wozniak
1976 - vi Text Editor Developed by Bill Joy
1974 - Internet by Vinton Cerf
1972 - C Language Developed by Dennis Ritchie
1971 - FTP Protocol Created by Abhay Bhushan
1970 - UNIX Operating System Developed by AT&T Bell Labs
►1957 - FORTRAN Language Developed by IBM
Storing FORTRAN Program Code on Punch Cards
FORTRAN 66 - Example Program Code
FORTRAN 77 - Example Program Code
►g77 - GNU Project FORTRAN Compiler