https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100799
--- Comment #34 from Ajit Kumar Agarwal <aagarwa at gcc dot gnu.org> --- Sent the patch for review. Here is the patch: PATCH] rs6000: Stackoverflow in optimized code on PPC (PR100799) When using FlexiBLAS with OpenBLAS we noticed corruption of the parameters passed to OpenBLAS functions. FlexiBLAS basically provides a BLAS interface where each function is a stub that forwards the arguments to a real BLAS lib, like OpenBLAS. Fixes the corruption of caller frame checking number of arguments is less than equal to GP_ARG_NUM_REG (8) excluding hidden unused DECLS. 2024-03-22 Ajit Kumar Agarwal <aagar...@linux.ibm.com> gcc/ChangeLog: PR rtk-optimization/100799 * config/rs600/rs600-calls.cc (rs6000_function_arg): Don't generate parameter save area if number of arguments passed less than equal to GP_ARG_NUM_REG (8) excluding hidden paramter. * function.cc (assign_parms_initialize_all): Check for hidden parameter in fortran code and set the flag hidden_string_length and actual paramter passed excluding hidden unused DECLS. * function.h: Add new field hidden_string_length and actual_parm_length in function structure.