summaryrefslogtreecommitdiff
path: root/gcc/calls.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/calls.c')
-rw-r--r--gcc/calls.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index 3b06ad397de..cd0d9c593f3 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -32,7 +32,7 @@ along with GCC; see the file COPYING3. If not see
#include "libfuncs.h"
#include "function.h"
#include "regs.h"
-#include "toplev.h"
+#include "diagnostic-core.h"
#include "output.h"
#include "tm_p.h"
#include "timevar.h"
@@ -1672,10 +1672,12 @@ load_register_parameters (struct arg_data *args, int num_actuals,
{
rtx mem = validize_mem (args[i].value);
- /* Check for overlap with already clobbered argument area. */
+ /* Check for overlap with already clobbered argument area,
+ providing that this has non-zero size. */
if (is_sibcall
- && mem_overlaps_already_clobbered_arg_p (XEXP (args[i].value, 0),
- size))
+ && (size == 0
+ || mem_overlaps_already_clobbered_arg_p
+ (XEXP (args[i].value, 0), size)))
*sibcall_failure = 1;
/* Handle a BLKmode that needs shifting. */