@@ -1323,14 +1323,10 @@ compare_for_stack_reg (rtx insn, stack r
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);
@@ -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 ();
+}