Comment 27 for bug 432222

Revision history for this message
Alan Modra (amodra) wrote :

Found the problem. It's nothing to do with _FORTIFY_SOURCE, and those intructions indexing off r2 are to do with -fstack-check so no problem there either.

Fixed as follows. Incidentally this bug was triggered by fixing the obvious bug in no_global_regs_above

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c (revision 152105)
+++ gcc/config/rs6000/rs6000.c (working copy)
@@ -16148,7 +16148,7 @@ rs6000_emit_prologue (void)
   int using_store_multiple;
   int using_static_chain_p = (cfun->static_chain_decl != NULL_TREE
                               && df_regs_ever_live_p (STATIC_CHAIN_REGNUM)
- && !call_used_regs[STATIC_CHAIN_REGNUM]);
+ && call_used_regs[STATIC_CHAIN_REGNUM]);
   HOST_WIDE_INT sp_offset = 0;

   if (TARGET_FIX_AND_CONTINUE)