1. If you complain of missed optimisations, you should post the command line switches you have used, the -Ox switch at least.
2. Don't use the naked attribute if you don't understand its implications - here, main uses stack frame which has not been created due to naked; this might work only by coincidence (Y being set to a sane value in startup). 3. You should post the assembler output of compiler (which contains symbolic labels) or relevant portions of disassembled elf, rather than disassembled object with unresolved jump targets, which makes tracing the code difficult. 4. If you desire control over code size (and other aspects of the code too), resort to assembler. Jan Waclawek _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-gcc-list