re PR debug/42299 (another verify_ssa failure with -g -O2)
PR debug/42299 PR debug/42166 * tree-ssa.c (insert_debug_temp_for_var_def): Skip propagation for ssa names already registered for update. From-SVN: r155063
This commit is contained in:
parent
aec4e50c21
commit
74e12783a3
|
@ -1,3 +1,10 @@
|
|||
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
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
/* { 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 ();
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
! { 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
|
||||
|
|
@ -312,9 +312,13 @@ insert_debug_temp_for_var_def (gimple_stmt_iterator *gsi, tree var)
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue