https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70676

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Target|                            |avr
           Priority|P3                          |P5
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2016-05-21
                 CC|                            |gjl at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
You missed to add a test case, cf. https://gcc.gnu.org/bugs/#need

> Can GCC in -Os really optimize only size and rollback optimizations

No, GCC usually won't "rollback" optimizations, and it won't perform
speculative optimizations.

There are cases where avr-gcc does not optimize sibling calls.  Provided you
use -mrelax (or link with -Wl,--relax), the linker tries to replace [R]CALL+RET
by [R]JMP instruction.  If there is a label at the }, i.e. between the CALL and
the RET, no optimization is possible.

Reply via email to