> We might want to check if doing -Og and not just -O0.

You're right, thanks, amended patch attached, same ChangeLog.

-- 
Eric Botcazou
Index: config/rs6000/rs6000.c
===================================================================
--- config/rs6000/rs6000.c	(revision 222439)
+++ config/rs6000/rs6000.c	(working copy)
@@ -21932,8 +21932,8 @@ rs6000_stack_info (void)
   /* Determine if we need to allocate any stack frame:
 
      For AIX we need to push the stack if a frame pointer is needed
-     (because the stack might be dynamically adjusted), if we are
-     debugging, if we make calls, or if the sum of fp_save, gp_save,
+     (because the stack might be dynamically adjusted), if we want
+     to debug, if we make calls, or if the sum of fp_save, gp_save,
      and local variables are more than the space needed to save all
      non-volatile registers: 32-bit: 18*8 + 19*4 = 220 or 64-bit: 18*8
      + 18*8 = 288 (GPR13 reserved).
@@ -21950,7 +21950,7 @@ rs6000_stack_info (void)
   else if (frame_pointer_needed)
     info_ptr->push_p = 1;
 
-  else if (TARGET_XCOFF && write_symbols != NO_DEBUG)
+  else if (TARGET_XCOFF && (!optimize || optimize_debug))
     info_ptr->push_p = 1;
 
   else

Reply via email to