http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55585



             Bug #: 55585

           Summary: compile time hog at -O1 -fboundscheck -g

    Classification: Unclassified

           Product: gcc

           Version: 4.7.3

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: middle-end

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: joost.vandevond...@mat.ethz.ch





Created attachment 28870

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28870

gzipped testcase



With 4.4.6 the following timings are seen:



time /usr/bin/gfortran -c -O0 slow.f90 

real    0m2.299s

time /usr/bin/gfortran -c -O1 -fbounds-check slow.f90 

real    0m16.560s

time /usr/bin/gfortran -c -g -O2 -fbounds-check slow.f90 

real    0m32.841s





With 4.7 I see significant slowdowns at -O1 -fbounds-check, being extreme with

-g



time gfortran -c -O0 slow.f90 

real    0m3.355s

time gfortran -c -O1 -fbounds-check slow.f90 

real    0m43.057s

time gfortran -c -g -O1 -fbounds-check slow.f90 

real    3m42.117s

time gfortran -c -g -O2 -fbounds-check  slow.f90 

real    0m20.102s





I wonder if whatever pass makes -O2 so fast should not be implied at -O1

-fbounds-check.

Reply via email to