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

             Bug #: 50439
           Summary: gfortran infinite loop with -floop-interchange
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: pthau...@gcc.gnu.org
                CC: berg...@gcc.gnu.org
              Host: powerpc64-linux
            Target: powerpc64-linux
             Build: powerpc64-linux


The following testcase (reduced from cpu2000 benchmark 200.sixtrack, comnul.f)
results in gfortran looping when compiled with -floop-interchange.


C       gfortran -c -O3 -floop-interchange
C-----------------------------------------------------------------------
      subroutine comnul
C-----------------------------------------------------------------------
      implicit real*8 (a-h,o-z)
      parameter(zero=0.0d0,half=0.5d0,one=1.0d0)
      common/secom/rtc(9,18,10,5),rts(9,18,10,5)
      save
C-----------------------------------------------------------------------
      do 110 i1=1,9
        do 110 i2=1,18
          do 110 i3=1,10
            do 110 i4=1,5
              rtc(i1,i2,i3,i4)=zero
              rts(i1,i2,i3,i4)=zero
  110 continue
      return
      end


I stopped it a few times under the debugger and following appeared to be common
chain in backtrace:

#6  0x0000000010d2b694 in Parma_Polyhedra_Library::PIP_Problem::solve
(this=0x11689bd0)
    at /home/pthaugen/src/ppl-0.11.2/src/PIP_Problem.cc:215
#7  0x0000000010d2b984 in Parma_Polyhedra_Library::PIP_Problem::is_satisfiable
(
    this=<optimized out>) at
/home/pthaugen/src/ppl-0.11.2/src/PIP_Problem.cc:649
#8  0x0000000010c1d864 in ppl_PIP_Problem_is_satisfiable (pip=<optimized out>)
    at
/home/pthaugen/src/ppl-0.11.2/interfaces/C/ppl_c_implementation_common.cc:2298
#9  0x0000000010ae2dd4 in ppl_powerset_is_empty (ps=0x115bcb40)
    at /home/pthaugen/src/gcc/trunk/gcc/gcc/graphite-ppl.c:553
#10 0x0000000010adb2ac in build_lexicographical_constraint
(direction=<optimized out>, 
    offset=<optimized out>, tdim=<optimized out>, dim=<optimized out>,
bag=<optimized out>)
    at /home/pthaugen/src/gcc/trunk/gcc/gcc/graphite-dependences.c:396
#11 dependence_polyhedron (original_scattering_p=<optimized out>,
direction=<optimized out>, 
    pdr2=<optimized out>, pdr1=<optimized out>)
    at /home/pthaugen/src/gcc/trunk/gcc/gcc/graphite-dependences.c:479
#12 new_poly_ddr (pdr1=<optimized out>, pdr2=0x114b80c0, direction=-1, 
    original_scattering_p=<optimized out>)
    at /home/pthaugen/src/gcc/trunk/gcc/gcc/graphite-dependences.c:534
#13 0x0000000010adc188 in graphite_legal_transform_dr (pdr2=<optimized out>, 
    pdr1=<optimized out>) at
/home/pthaugen/src/gcc/trunk/gcc/gcc/graphite-dependences.c:631
#14 graphite_legal_transform_bb (pbb2=<optimized out>, pbb1=<optimized out>)
    at /home/pthaugen/src/gcc/trunk/gcc/gcc/graphite-dependences.c:710
#15 graphite_legal_transform (scop=0x114c0200)
    at /home/pthaugen/src/gcc/trunk/gcc/gcc/graphite-dependences.c:729
...


GCC configure:

> ~/install/gcc/trunk/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/home/pthaugen/install/gcc/trunk/bin/gcc
COLLECT_LTO_WRAPPER=/home/pthaugen/install/gcc/trunk/libexec/gcc/powerpc64-linux/4.7.0/lto-wrapper
Target: powerpc64-linux
Configured with: /home/pthaugen/src/gcc/trunk/gcc/configure
--prefix=/home/pthaugen/install/gcc/trunk --target=powerpc64-linux
--host=powerpc64-linux --build=powerpc64-linux --enable-secureplt
--enable-threads=posix --enable-shared --enable-__cxa_atexit
--with-long-double-128 --enable-decimal-float --disable-alsa --enable-checking
--with-lto --with-as=/home/wschmidt/binutils/install/bin/as
--with-ld=/home/wschmidt/binutils/install/bin/ld
--with-gmp=/home/pthaugen/install/gcc-host-libs
--with-mpfr=/home/pthaugen/install/gcc-host-libs
--with-mpc=/home/pthaugen/install/gcc-host-libs
--with-ppl=/home/pthaugen/install/gcc-host-libs
--with-cloog=/home/pthaugen/install/gcc-host-libs
--with-host-libstdcxx=-Wl,-Bstatic,-L/home/pthaugen/install/gcc-host-libs/lib,-lstdc++,-Bdynamic,-lm
--enable-languages=c,fortran,c++ --disable-bootstrap
Thread model: posix
gcc version 4.7.0 20110913 (experimental) [trunk revision 178814] (GCC) 



Using the following prereq libs:

cloog-ppl-0.15.10
gmp-4.3.2
mpc-0.9
mpfr-3.0.0
ppl-0.11.2


gfortran also loops with -floop-interchange when building cpu2006 benchmark
416.gamess file mpcint.fppized.f.

Reply via email to