mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-12 01:34:58 +08:00
re PR debug/51762 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2231)
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. From-SVN: r182924
This commit is contained in:
parent
629c2cca17
commit
f8f75b16c2
@ -1,3 +1,9 @@
|
|||||||
|
2012-01-05 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR debug/51762
|
||||||
|
* calls.c (emit_call_1): For noreturn calls force a REG_ARGS_SIZE
|
||||||
|
note when !ACCUMULATE_OUTGOING_ARGS.
|
||||||
|
|
||||||
2012-01-05 Eric Botcazou <ebotcazou@adacore.com>
|
2012-01-05 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* tree-vrp.c (extract_range_from_binary_expr_1): Remove duplicated
|
* tree-vrp.c (extract_range_from_binary_expr_1): Remove duplicated
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* Convert function calls to rtl insns, for GNU C compiler.
|
/* Convert function calls to rtl insns, for GNU C compiler.
|
||||||
Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
||||||
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
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.
|
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)
|
if (SUPPORTS_STACK_ALIGNMENT)
|
||||||
crtl->need_drap = true;
|
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)
|
if (!ACCUMULATE_OUTGOING_ARGS)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
2012-01-05 Jakub Jelinek <jakub@redhat.com>
|
2012-01-05 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR debug/51762
|
||||||
|
* gcc.dg/pr51762.c: New test.
|
||||||
|
|
||||||
PR rtl-optimization/51767
|
PR rtl-optimization/51767
|
||||||
* gcc.c-torture/compile/pr51767.c: New test.
|
* gcc.c-torture/compile/pr51767.c: New test.
|
||||||
|
|
||||||
|
19
gcc/testsuite/gcc.dg/pr51762.c
Normal file
19
gcc/testsuite/gcc.dg/pr51762.c
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/* PR debug/51762 */
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-g -Os -fomit-frame-pointer -fno-asynchronous-unwind-tables" } */
|
||||||
|
|
||||||
|
void noret (void) __attribute__ ((noreturn));
|
||||||
|
int bar (void);
|
||||||
|
void baz (const char *);
|
||||||
|
static int v = -1;
|
||||||
|
|
||||||
|
void
|
||||||
|
foo (void)
|
||||||
|
{
|
||||||
|
if (bar () && v == -1)
|
||||||
|
{
|
||||||
|
baz ("baz");
|
||||||
|
noret ();
|
||||||
|
}
|
||||||
|
noret ();
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user