[Bug middle-end/42590] unnecessary stack frame set up
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42590 Martin Jambor jamborm at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED --- Comment #4 from Martin Jambor jamborm at gcc dot gnu.org 2010-12-16 15:00:58 UTC --- I guess it is. Please re-open if not.
[Bug middle-end/42590] unnecessary stack frame set up
--- Comment #1 from jamborm at gcc dot gnu dot org 2010-01-25 18:02 --- Since PR 42585 is fixed, the optimized dump (at -O2) is bb 2: _T2$curr_12 = sptr_1(D)-curr; D.1966_7 = _T2$curr_12 + -1; sptr_1(D)-curr = D.1966_7; return 0; } The generated assembly is: Cyc_string_ungetc: pushl %ebp movl%esp, %ebp movl12(%ebp), %eax subl$1, (%eax) xorl%eax, %eax popl%ebp ret With -O2 -fomit-frame-pointer it is: Cyc_string_ungetc: movl8(%esp), %eax subl$1, (%eax) xorl%eax, %eax ret (Which is weird because the manual says that -fomit-frame-pointer is enabled at -O2 by default - maybe this is the actual bug here now?) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42590
[Bug middle-end/42590] unnecessary stack frame set up
--- Comment #2 from jakub at gcc dot gnu dot org 2010-01-25 18:24 --- On i?86-linux -fomit-frame-pointer is not the default, on the contrary. info gcc says: `-O' also turns on `-fomit-frame-pointer' on machines where doing so does not interfere with debugging. and i?86-linux is not considered such machine (unlike e.g. x86_64-linux). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42590
[Bug middle-end/42590] unnecessary stack frame set up
--- Comment #3 from jamborm at gcc dot gnu dot org 2010-01-25 18:30 --- I have found the sentence you quoted in the manual too but it refers only to -O1 (as far as I understand it). And the description of -fomit-frame-pointer simply states that Enabled at levels -O, -O2, -O3, -Os. So I'd say that at least the documentation is slightly confusing. Anyway, does this mean that this issue is also resolved now? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42590