------- 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
        movl    12(%ebp), %eax
        subl    $1, (%eax)
        xorl    %eax, %eax
        popl    %ebp
        ret

With -O2 -fomit-frame-pointer it is:

Cyc_string_ungetc:
        movl    8(%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

Reply via email to