>> For -O0 it works but upgrading to -Os makes the code non functional. > >Indeed. The bug is present only with -O2, -O3 and -Os. -O0 and -O1 produces >stack frame of expected size...
Narrowed the problem down to -fstrict-aliasing (with no optimization flags otherwise). Accrodingly, using -Os (or >= -O2) together with -fno-strict-aliasing produces the expected stack frame size. The same applies for the example with inlined functions provided by Wouter, which further enhances my belief that it is the same bug. Reading about what -fstrict-aliasing is intended to achieve makes me incrementally understand less and less... :-( JW _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list