Jan Waclawek schrieb:

Moreover, in 4.7 it also stores the variable to stack frame even
without naked, so that could be called a missed
optimisation/regression.

Thanks for pointing this out. I was lost in all that optimization conversation and thought it was an optimization issue from the first post.

There is nothing written like "program crashes because non-existent frame used".

So the very problem is that there is a frame needed and there is none because of "naked".

Well, that's a bug in the user code, not in the application:
You must not assume that the C code need no frame, even if it is a reasonable assumption like here.

However, the frame is really strange and my first suspect is the evildoer: -fcaller-saves.

That option causes evil in some places, or let me put things the other way round: In some cases -fno-caller-saves can avoid harm like spill fails in presence of high register pressure, see PR50925.

Johann

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to