PR debug/42166
* tree-ssa.c (insert_debug_temp_for_var_def): Skip propagation
for ssa names already registered for update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155063
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-12-07 Richard Henderson <rth@redhat.com>
+
+ PR debug/42299
+ PR debug/42166
+ * tree-ssa.c (insert_debug_temp_for_var_def): Skip propagation
+ for ssa names already registered for update.
+
2009-12-07 Jakub Jelinek <jakub@redhat.com>
PR debug/42244
--- /dev/null
+/* { dg-options "-g" } */
+
+static int
+foo (int x, int y)
+{
+ if (y)
+ goto lab;
+ if (x)
+ y = 0;
+ if (y)
+ goto lab;
+ y = 0;
+lab:
+ return y;
+}
+
+void
+baz (int x, int y)
+{
+ y = foo (x, y);
+ if (y != 0)
+ bar ();
+}
--- /dev/null
+! { dg-options "-O2 -g" }
+
+MODULE powell
+ INTEGER, PARAMETER :: dp=8
+CONTAINS
+ SUBROUTINE newuob (n, bmat, ndim, d, vlag, w, npt)
+ REAL(dp), DIMENSION(ndim, *), INTENT(inout) :: bmat
+ REAL(dp), DIMENSION(*), INTENT(inout) :: d, vlag, w
+ REAL(dp) :: sum
+ INTEGER, INTENT(in) :: npt
+ DO j=1,n
+ jp=npt+j
+ DO k=1,n
+ sum=sum+bmat(jp,k)*d(k)
+ END DO
+ vlag(jp)=sum
+ END DO
+ END SUBROUTINE newuob
+END MODULE powell
+
if (!MAY_HAVE_DEBUG_STMTS)
return;
- /* First of all, check whether there are debug stmts that reference
- this variable and, if there are, decide whether we should use a
- debug temp. */
+ /* If this name has already been registered for replacement, do nothing
+ as anything that uses this name isn't in SSA form. */
+ if (name_registered_for_update_p (var))
+ return;
+
+ /* Check whether there are debug stmts that reference this variable and,
+ if there are, decide whether we should use a debug temp. */
FOR_EACH_IMM_USE_FAST (use_p, imm_iter, var)
{
stmt = USE_STMT (use_p);