From the description, it looks like compiler behavior regarding stack operations is changed with compiler upgrade.
As long as you are saying the disassembled function looks differently when compiled by different versions of tool chain you are using, this may mean only the fact that new compiler compiles your code in different way.
I can only suggest looking to your disassembled code to understand which particular part in your code causes this different behavior of compilers. If the particular place is known, please look it twice for any possible mistakes regarding the amount of data stored in stack. If there is no obvious mistakes, please try to approach toolchain vendor.
Have a great day,
Alexander
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------