Hi, A recent patch I submitted fixed broken -fstack-usage for the avr target, by including the size of the return address pushed to the stack (https://gcc.gnu.org/ml/gcc-patches/2016-05/msg01715.html).
I forgot to send this testcase modification with that patch - here's the fix for making gcc.dg/stack-usage-1.c pass again for avr. If this is ok, could someone commit please? I don't have commit access. Regards Senthil gcc/testsuite/ChangeLog 2016-06-08 Senthil Kumar Selvaraj <senthil_kumar.selva...@atmel.com> * gcc.dg/stack-usage-1.c (SIZE): Consider return address when setting SIZE. diff --git gcc/testsuite/gcc.dg/stack-usage-1.c gcc/testsuite/gcc.dg/stack-usage-1.c index 7864c6a..bdc5656 100644 --- gcc/testsuite/gcc.dg/stack-usage-1.c +++ gcc/testsuite/gcc.dg/stack-usage-1.c @@ -64,7 +64,11 @@ # define SIZE 240 # endif #elif defined (__AVR__) -# define SIZE 254 +#if defined (__AVR_3_BYTE_PC__ ) +# define SIZE 251 /* 256 - 2 bytes for Y - 3 bytes for return address */ +#else +# define SIZE 252 /* 256 - 2 bytes for Y - 2 bytes for return address */ +#endif #elif defined (__s390x__) # define SIZE 96 /* 256 - 160 bytes for register save area */ #elif defined (__s390__)