AVR, output string corrupt if compiled with optimization level -O2.
Original Reporter info from Mantis: Bernd
-
Reporter name: Bernd
Original Reporter info from Mantis: Bernd
- Reporter name: Bernd
Description:
The output string is corrupt, if the program is compiled with optimization level -O2. The program runs fine with optimization levels -O1 and -O3. I noticed this on an ATMega2560, when I sent strings over the UART. The problem is reproducible with Laksens avrsim (https://github.com/Laksen/fp-avrsim) too.
This seems to be a regression which was introduced with fpc revision 38487/38488. Revision 38486 does not show this problem.
Attached is the test project.