Fortran Front End

Our Fortran front end was started in 1990; it was first released in 1991. It supports the full FORTRAN 77 language, the MIL-STD-1753 extension to that language, and a few other common extensions.

The front end does complete syntax and semantic checking, including complete error checking. Diagnostics always display the source line with a caret indicating the exact position of the error.

The front end translates source programs into a high-level, tree-structured, in-memory intermediate language. The intermediate language preserves a great deal of source information (e.g., line numbers, column numbers, original types, original names), which is helpful in generating symbolic debugging information. Implicit operations in the source are made explicit in the intermediate language, but constructs are not otherwise added, removed, or reordered. The intermediate language is not machine dependent (e.g., it does not specify registers or dictate the layout of stack frames).

The front end can optionally generate raw cross-reference information, which can be used as a basis for building source browsing tools.

Also included: a C-generating back end, which can be used to generate C code for Fortran programs (this code works with the runtime library from the freely-available f2c); and utilities to write the intermediate language to a file, read it back in, and display it in human- readable form.

The front end consists of about 61,000 lines of source code, of which about 30% are comments. The code is written in ANSI C, with host and target dependencies carefully segregated from the bulk of the code. It can be rehosted easily on a variety of machines and operating systems. Since the host and target dependencies are separately configurable, the front end can be used as part of a cross compiler.

There is extensive debugging and consistency-checking code, which can be included or excluded separately by conditional compilation.

The internal documentation comprises about 145 pages.