[Bug tree-optimization/60694] New: Gcc-4.2.4 hangs during compilation of the attached test

niva at niisi dot msk.ru gcc-bugzilla@gcc.gnu.org
Fri Mar 28 10:53:00 GMT 2014


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

            Bug ID: 60694
           Summary: Gcc-4.2.4 hangs during compilation of the attached
                    test
           Product: gcc
           Version: 4.2.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: niva at niisi dot msk.ru

Created attachment 32471
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32471&action=edit
The test file.

Native gcc-4.1.2 and gcc-4.2.4 hang during compilation of the attached test.

It seems that some analysis pass in cc1 exponentially depends on
the size of expressions being analyzed. When I reduce the
number of "basic blocks" in the loop the compilation time
varies as follows:

$ time gcc -O3 -S smuladd16.c 
real    0m0.431s
user    0m0.069s
sys     0m0.014s

$ time gcc -O3 -S smuladd24.c
real    0m7.041s
user    0m7.011s
sys     0m0.013s

$ time gcc -O3 -S smuladd28.c
real    1m50.267s
user    1m49.829s
sys     0m0.109s

I checked that later versions of gcc (4.4.6, 4.7.3, gcc-4.9.0)
behave normally. But actually we are using a cross-compiler based on
gcc-4.1.2 with plenty of changes and we cannot migrate to
to a later gcc version quickly. 

Is there a patch which solves the problem?



More information about the Gcc-bugs mailing list