g77 in egcs-1.1.1

Josip Loncaric josip@icase.edu
Fri Jan 15 08:18:00 GMT 1999


LAPACK, a standard package of linear algebra routines available from
http://www.netlib.org/ , does not compile properly in egcs-1.1.1 under
Red Hat Linux 5.2 running on a Pentium II system.  The command used was:

g77 -O3 -funroll-all-loops -fomit-frame-pointer -m486 -malign-double -c
...

Problems:

(1) Test program xlintstc dumps core:

Data file for testing COMPLEX LAPACK linear equation routines
xlintstc < ctest.in > ctest.out 2>&1
make[1]: *** [ctest.out] Error 139

This problem can be fixed by adding "-fno-emulate-complex" compiler
switch. Clearly, there is a problem with complex arithmetic under
certain conditions.

(2) g77 still does not allow the use of simple intrinsics like MAX() in
PARAMETER statements.  This prevents compilation of LAPACK timing
routines in their original form.  Statements like PARAMETER
(LSIZE=MAX(THIS,THAT)) are so basic to most standard packages in Fortran
that g77 should handle it.  As things stand, one is forced into
cumbersome and error prone code rewriting.

I should mention that no problems whatsoever arise when using plain
"fort77 -O" or Portland Group's "pgf77 -fast" to compile and test
LAPACK.  Unfortunately, fort77 produces slow code, while the pgf77 is
fast but not widely available due to cost.  The egcs-1.1.1 version of
g77 produces very fast code and should become widely available, but in
its present form it cannot handle typical Fortran packages like LAPACK.

May I suggest that "compile & test LAPACK" should be one of standard
tests for any Fortran compiler?

-- 
Dr. Josip Loncaric, Senior Staff Scientist        mailto:josip@icase.edu
ICASE, Mail Stop 403                        http://www.icase.edu/~josip/
NASA Langley Research Center             mailto:j.loncaric@larc.nasa.gov
Hampton, VA 23681-2199, USA    Tel. +1 757 864-2192  Fax +1 757 864-6134



More information about the Gcc-bugs mailing list