GCC 4.3 spent several hours compiling the attached program before I gave up.
I have no idea whether it would ever complete or not.  All I know is that it
is spending an awful lot of time in var-tracking.c.

You need the following parameters to see this problem:

-g -O1 -fno-strict-aliasing -fwrapv -fexpensive-optimizations -fforce-addr
-fPIC

This is on x86_64, btw; I believe the program compiles on ia64, but I'm
not sure.

In the hours that GCC ran, it spent all its time in vt_find_locations():

#3  0x00000000007b6cd1 in vt_find_locations () at gcc/var-tracking.c:1858
#4  0x00000000007b9f14 in variable_tracking_main () at gcc/var-tracking.c:2976
#5  0x00000000005f2fe1 in execute_one_pass (pass=0xcd8b20) at gcc/passes.c:1058
#6  0x00000000005f319c in execute_pass_list (pass=0xcd8b20)
    at gcc/passes.c:1110
#7  0x00000000005f31ae in execute_pass_list (pass=0xcd5f40)
    at gcc/passes.c:1111
#8  0x00000000005f31ae in execute_pass_list (pass=0xcd5ee0)
    at gcc/passes.c:1111
#9  0x00000000006c0028 in tree_rest_of_compilation (fndecl=0x2ae7782e9ee0)
    at gcc/tree-optimize.c:412
#10 0x0000000000440cd1 in c_expand_body (fndecl=0x61a12c8)
    at gcc/c-common.c:4285
#11 0x00000000007f5e40 in cgraph_expand_function (node=0x2ae77878b000)
    at gcc/cgraphunit.c:1015
#12 0x00000000007f80c2 in cgraph_optimize () at gcc/cgraphunit.c:1084
#13 0x00000000004145e9 in c_write_global_declarations () at gcc/c-decl.c:7930
#14 0x000000000066c13d in toplev_main (argc=<value optimized out>, argv=<value
optimized out>)
    at gcc/toplev.c:1063
#15 0x00002ae777a024ca in __libc_start_main () from /lib/libc.so.6
#16 0x0000000000403c7a in _start () at ../sysdeps/x86_64/elf/start.S:113

Richi, do you think you could take a look?


-- 
           Summary: [4.3] inf loop/long compile time, time spent in var-
                    tracking.c
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tbm at cyrius dot com


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

Reply via email to