This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g77-20000626 miscompilation of nested loops at -Os -funroll-loops (x86)


This bug has remained in gcc-2.96 for months; all other bugs which I have reported have been fixed.  The two nested loop groups from
Livermore Fortran Kernels which are being miscompiled are isolated in the files k18a.f and k23.f.  These files continue to compile
correctly with all options tested under gcc-2.95.2, and fail under gcc-2.96 only with the combination -Os -funroll-loops.  The
options -march=pentiumpro and -ffast-math make no difference, and correct results are obtained without -funroll-loops, with the
combinations -O -funroll-loops, -O2 -funroll-loops, and with a subroutine call inserted to avoid having nested loops in one
compilation unit.  The fact that these examples have a fixed count on the outer loop appears to be coincidental;  making them
variable does not affect the problem.  If the fixed count outer loop is unrolled in source code, that also eliminates the problem.

Tim Prince

llnk.f.gz

kb.f

k18a.f

k23.f


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]