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

Billinghurst, David (CRTS) David.Billinghurst@riotinto.com.au
Tue Jun 27 19:03:00 GMT 2000


What is the copyright on these.  I am happy to knock them into a testsuite
patch and submit it if there are no issues.

> -----Original Message-----
> From:	Tim Prince [SMTP:tprince@computer.org]
> Sent:	Wednesday, 28 June 2000 11:48
> To:	gcc-bugs@gcc.gnu.org
> Subject:	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 << File: llnk.f.gz >>  << File: kb.f >>  << File: k18a.f >>  <<
> File: k23.f >> 


More information about the Gcc-bugs mailing list