Commit f8f75b16 by Jakub Jelinek Committed by Jakub Jelinek

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
parent 629c2cca
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>
* tree-vrp.c (extract_range_from_binary_expr_1): Remove duplicated
/* 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)
{
......
2012-01-05 Jakub Jelinek <jakub@redhat.com>
PR debug/51762
* gcc.dg/pr51762.c: New test.
PR rtl-optimization/51767
* gcc.c-torture/compile/pr51767.c: New test.
......
/* 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 ();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment