[Bug tree-optimization/48714] gcc -O hangs gobbling memory, while gcc -O -fno-tree-fre finishes quickly

arthur.j.odwyer at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Apr 21 21:35:00 GMT 2011


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

Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.4.5, 4.5.1
            Version|unknown                     |4.7.0

--- Comment #1 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> 2011-04-21 21:34:41 UTC ---
Here's another test case with exactly the same symptom. Again, it works with
gcc-4.4 but fails with my bleeding-edge gcc. The braces around the inner loop
are significant. Notice that the offending assignment to "gp" is actually dead
code.

cat >test106865.c <<EOF
extern volatile int g_89[5][9];
extern int g, *gp;
void func_64() {
    int i;
    for (i = 0; i < 1; ) {
        for (g = 0; g < 1; ) {
            return;
        }
        gp = &g_89[g][0];
    }
}
EOF
gcc -w -O1 -c test106865.c
[hangs]
gcc -w -O1 -fno-tree-pre -c test106865.c
[passes]



More information about the Gcc-bugs mailing list