[backport from gcc-4.8/trunk r189326, fixes regression from r188998 ] gcc/ 2012-07-06 Alexandre Oliva PR debug/53820 * var-tracking.c (vt_add_function_parameter): Convert internal_arg_pointer into arg_pointer-based address even without DRAP. --- gcc-4.7.1/gcc/var-tracking.c.~1~ 2012-08-12 13:22:52.000000000 +0200 +++ gcc-4.7.1/gcc/var-tracking.c 2012-08-12 13:32:09.000000000 +0200 @@ -9294,14 +9294,11 @@ vt_add_function_parameter (tree parm) if (GET_MODE (decl_rtl) == BLKmode || GET_MODE (incoming) == BLKmode) return; - /* If there is a DRAP register, rewrite the incoming location of parameters - passed on the stack into MEMs based on the argument pointer, as the DRAP - register can be reused for other purposes and we do not track locations - based on generic registers. But the prerequisite is that this argument - pointer be also the virtual CFA pointer, see vt_initialize. */ + /* If there is a DRAP register or a pseudo in internal_arg_pointer, + rewrite the incoming location of parameters passed on the stack + into MEMs based on the argument pointer, so that incoming doesn't + depend on a pseudo. */ if (MEM_P (incoming) - && stack_realign_drap - && arg_pointer_rtx == cfa_base_rtx && (XEXP (incoming, 0) == crtl->args.internal_arg_pointer || (GET_CODE (XEXP (incoming, 0)) == PLUS && XEXP (XEXP (incoming, 0), 0)