re PR debug/52132 (ICE in loc_descriptor)

PR debug/52132
	* reg-stack.c (subst_stack_regs_in_debug_insn): Don't use
	get_true_reg.

	* gcc.dg/pr52132.c: New test.

From-SVN: r184126
This commit is contained in:
Jakub Jelinek 2012-02-11 09:27:30 +01:00 committed by Jakub Jelinek
parent 28f7ff45ec
commit bd0ba05d4c
4 changed files with 31 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2012-02-11 Jakub Jelinek <jakub@redhat.com>
PR debug/52132
* reg-stack.c (subst_stack_regs_in_debug_insn): Don't use
get_true_reg.
2012-02-11 Uros Bizjak <ubizjak@gmail.com>
* compare-elim.c (find_comparisons_in_bb): Eliminate only compares

View File

@ -1,6 +1,6 @@
/* Register to Stack convert for GNU compiler.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of GCC.
@ -1323,14 +1323,10 @@ compare_for_stack_reg (rtx insn, stack regstack, rtx pat_src)
static int
subst_stack_regs_in_debug_insn (rtx *loc, void *data)
{
rtx *tloc = get_true_reg (loc);
stack regstack = (stack)data;
int hard_regno;
if (!STACK_REG_P (*tloc))
return 0;
if (tloc != loc)
if (!STACK_REG_P (*loc))
return 0;
hard_regno = get_hard_regnum (regstack, *loc);

View File

@ -1,3 +1,8 @@
2012-02-11 Jakub Jelinek <jakub@redhat.com>
PR debug/52132
* gcc.dg/pr52132.c: New test.
2012-02-10 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/specs/aggr4.ads: New test.

View File

@ -0,0 +1,18 @@
/* PR debug/52132 */
/* { dg-do compile } */
/* { dg-options "-std=c99 -O2 -g" } */
int l;
void bar (void);
void
foo (int *x, float y)
{
float b;
union { float f; int i; } u = { .f = y };
u.i += 127 << 23;
u.f = ((-1.0f / 3) * u.f + 2) * u.f - 2.0f / 3;
b = 0.5 * (u.f + l);
if (b >= *x)
bar ();
}