Bug 30559 - [4.3 Regression] compiler loops forever with flag -O3
[4.3 Regression] compiler loops forever with flag -O3
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: tree-optimization
4.3.0
: P3 normal
: 4.3.0
Assigned To: Not yet assigned to anyone
: alias, compile-time-hog
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-23 16:12 UTC by David Binderman
Modified: 2007-02-19 19:34 UTC (History)
1 user (show)

See Also:
Host: x86_64-suse-linux
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
C source code (502.56 KB, text/plain)
2007-01-23 16:13 UTC, David Binderman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2007-01-23 16:12:13 UTC
I just tried to compile Suse Linux package libnasl-2.2.6-40
with the new GNU C compiler version 4.3 snapshot 20070119.

I used compiler flag -O3. The compiler appeared to hang
for more than 30 minutes when compiling source code file regex.c.

I tried compiling the same file with the same compiler and
flag -O2 and the compiler took 5 seconds.

I tried compiling the same file with gcc 4.1.2 and flag -O3
and that compiler took 2.3 seconds.

I checked the memory usage of the 20070119 compiler and
it was about 40Megs on an idle system with 512Meg of RAM 
fitted.

Preprocessed source code attached. Flag -O3 required.
Comment 1 David Binderman 2007-01-23 16:13:46 UTC
Created attachment 12938 [details]
C source code
Comment 2 Andrew Pinski 2007-01-23 16:25:36 UTC
This should be fixed with http://gcc.gnu.org/ml/gcc-patches/2007-01/msg01728.html I think.
Comment 3 David Binderman 2007-01-27 22:12:14 UTC
(In reply to comment #2)
> This should be fixed with
> http://gcc.gnu.org/ml/gcc-patches/2007-01/msg01728.html I think.

I suspect not.

The snapshot 20070126 still seems to have the problem.


Comment 4 Andrew Pinski 2007-01-29 00:51:00 UTC
Sample backtrace:
#0  topo_visit (graph=0x9d55760, ti=0x9d55750, n=80) at /src/gcc/regressions1/gcc/gcc/bitmap.h:388
#1  0x083a4312 in topo_visit (graph=0x9d55760, ti=0x9d55750, n=79)
    at /src/gcc/regressions1/gcc/gcc/tree-ssa-structalias.c:1294
#2  0x083a4312 in topo_visit (graph=0x9d55760, ti=0x9d55750, n=4)
    at /src/gcc/regressions1/gcc/gcc/tree-ssa-structalias.c:1294
#3  0x083a56fe in solve_graph (graph=0x9d55760) at /src/gcc/regressions1/gcc/gcc/tree-ssa-structalias.c:1620
#4  0x083aaa70 in compute_points_to_sets (ai=0x9d14fe8)
    at /src/gcc/regressions1/gcc/gcc/tree-ssa-structalias.c:4758
#5  0x08332a6e in compute_may_aliases () at /src/gcc/regressions1/gcc/gcc/tree-ssa-alias.c:897



-----------------
#0  topo_visit (graph=0x9d55760, ti=0x9d55750, n=688) at /src/gcc/regressions1/gcc/gcc/bitmap.h:426
#1  0x083a4312 in topo_visit (graph=0x9d55760, ti=0x9d55750, n=684)
    at /src/gcc/regressions1/gcc/gcc/tree-ssa-structalias.c:1294
#2  0x083a4312 in topo_visit (graph=0x9d55760, ti=0x9d55750, n=665)
    at /src/gcc/regressions1/gcc/gcc/tree-ssa-structalias.c:1294
#3  0x083a4312 in topo_visit (graph=0x9d55760, ti=0x9d55750, n=661)
    at /src/gcc/regressions1/gcc/gcc/tree-ssa-structalias.c:1294
#4  0x083a56fe in solve_graph (graph=0x9d55760) at /src/gcc/regressions1/gcc/gcc/tree-ssa-structalias.c:1620
#5  0x083aaa70 in compute_points_to_sets (ai=0x9d14fe8)
    at /src/gcc/regressions1/gcc/gcc/tree-ssa-structalias.c:4758
#6  0x08332a6e in compute_may_aliases () at /src/gcc/regressions1/gcc/gcc/tree-ssa-alias.c:897
Comment 5 Andrew Pinski 2007-01-29 18:01:24 UTC
Can you try after:
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121295

?
Comment 6 David Binderman 2007-02-05 17:44:40 UTC
(In reply to comment #5)
> Can you try after:
> http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121295

The snapshot 20070202 seems fixed to me.


Comment 7 Daniel Berlin 2007-02-19 19:34:25 UTC
Sorry, the fix was committed before the bug report was filed (IE ~5 minutes before).
I forgot to mark this one closed.