This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] PR 30835
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 12 Mar 2007 22:46:22 +0100
- Subject: [patch] PR 30835
Hello,
we ICE in can_convert_to_perfect_nest since we access the block returned
by bb_for_stmt directly; however, if the statement is a fake statement
that defines the initial value of a function parameter, then bb_for_stmt
is NULL. Bootstrapped & regtested on i686, commited.
Zdenek
PR tree-optimization/30835
* lambda-code.c (can_convert_to_perfect_nest): Check whether
bb_for_stmt is not NULL before accessing it.
Index: lambda-code.c
===================================================================
*** lambda-code.c (revision 122807)
--- lambda-code.c (working copy)
*************** can_convert_to_perfect_nest (struct loop
*** 2363,2370 ****
{
tree arg_stmt = SSA_NAME_DEF_STMT (arg);
! if (bb_for_stmt (arg_stmt)->loop_father
! == loop->inner)
goto fail;
}
}
--- 2363,2371 ----
{
tree arg_stmt = SSA_NAME_DEF_STMT (arg);
! if (bb_for_stmt (arg_stmt)
! && (bb_for_stmt (arg_stmt)->loop_father
! == loop->inner))
goto fail;
}
}