Checking properties of the compiler and the run-time environment

chksys.f A program to determine the properties of the run-time environment for FORTRAN 77 programs
chkcomp.f A FORTRAN 77 source file containing deliberate deviations from the standard and deliberate bad statements for testing the compiler's accuracy
chksysff.f90 A program to determine the properties of the run-time environment for Fortran 90 programs
chkcomff.f90 A Fortran 90 source file containing deliberate deviations from the standard and deliberate bad statements for testing the compiler's accuracy
chksysc.c A program to determine the properties of the run-time environment for C programs
chkcompc.c A C source file containing deliberate deviations from the standard and deliberate bad statements for testing the compiler's accuracy
fp_special.f90 A Fortran 90 program to test the behaviour of a program in the presence of floating-point exceptions and special IEEE numbers (notably negative zeros)

Introduction

The programs CHKSYS and CHKSYSFF are meant to help understand the run-time environment of a FORTRAN program. For C there is a similar program, CHKSYSC.

In many cases the actual behaviour of a program depends on the compiler you use and the options you included during the compile and link steps. This is especially true if errors occur or if you are using certain open-ended language features.

Many programmers are not aware that such features exist and it is sometimes difficult or impossible to find them in the documentation.

That is where the CHKSYS offer some assistence:

The program source CHKCOMP (in chkcomp.f(or) and its Fortran 90 equivalent chkcomff.f90) is meant to test the accuracy of the compiler. It is not meant to validate the compiler. It simply contains a fair number of very common extensions to the standard and some deliberate program errors (like jumping into a DO-loop and inaccessible statements). The errors are documented in the source code via comments.

The rest of this document describes:
How to use the programs
Description of the tests
Presentation of some results

Usage of the programs

CHKCOMP:

CHKSYS:

Tests that are performed

CHKSYS performs the following tests: