aboutsummaryrefslogtreecommitdiff
path: root/gcc/calls.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-01-05 20:47:16 +0000
committerJakub Jelinek <jakub@redhat.com>2012-01-05 20:47:16 +0000
commita9aee99f4773f933034ad78a8a9b25411ebb80a4 (patch)
tree9bec1abf57ab342191f47a5f4dedef16189d8eb7 /gcc/calls.c
parent89aa60772e65916409426c7844d16795ee495b6e (diff)
PR debug/51762
* calls.c (emit_call_1): For noreturn calls force a REG_ARGS_SIZE note when !ACCUMULATE_OUTGOING_ARGS. * gcc.dg/pr51762.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@182924 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r--gcc/calls.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index c8d0b849985..943ab093c0f 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -1,7 +1,7 @@
/* Convert function calls to rtl insns, for GNU C compiler.
Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011 Free Software Foundation, Inc.
+ 2011, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -445,6 +445,11 @@ emit_call_1 (rtx funexp, tree fntree ATTRIBUTE_UNUSED, tree fndecl ATTRIBUTE_UNU
if (SUPPORTS_STACK_ALIGNMENT)
crtl->need_drap = true;
}
+ /* For noreturn calls when not accumulating outgoing args force
+ REG_ARGS_SIZE note to prevent crossjumping of calls with different
+ args sizes. */
+ else if (!ACCUMULATE_OUTGOING_ARGS && (ecf_flags & ECF_NORETURN) != 0)
+ add_reg_note (call_insn, REG_ARGS_SIZE, GEN_INT (stack_pointer_delta));
if (!ACCUMULATE_OUTGOING_ARGS)
{