https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100962
Georg-Johann Lay changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
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.
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
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
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?