[Bug target/100962] Poor optimization of AVR code when using structs in __flash

2023-01-25 Thread gjl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100962 Georg-Johann Lay changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug target/100962] Poor optimization of AVR code when using structs in __flash

2021-10-26 Thread gjl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100962 --- Comment #4 from Georg-Johann Lay --- Did you try option -mstrictX? And try to make a problem-report self-contained.

[Bug target/100962] Poor optimization of AVR code when using structs in __flash

2021-06-08 Thread mojo at world3 dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100962 --- Comment #3 from mojo at world3 dot net --- Apologies, I noticed I had -Og on. Tried with -O3 and it optimised the struct away. With -O2 it uses the Z register with displacement, reading data from flash. So it seems that only -Og produces poo

[Bug target/100962] Poor optimization of AVR code when using structs in __flash

2021-06-08 Thread mojo at world3 dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100962 --- Comment #2 from mojo at world3 dot net --- avr-gcc-11.1.0-x64-windows>bin\avr-gcc -Og -xc -Wall -mmcu=atxmega64a1u test.c avr-gcc-11.1.0-x64-windows>bin\avr-objdump -h -S a.out > list.s Still producing code like this 2de: 18 97

[Bug target/100962] Poor optimization of AVR code when using structs in __flash

2021-06-08 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100962 --- Comment #1 from Richard Biener --- You are using quite old (and unmaintained) GCC - does using newer GCC, like GCC 10 or GCC 11 improve things?