aboutsummaryrefslogtreecommitdiff
path: root/gcc/lambda-code.c
diff options
context:
space:
mode:
authorZdenek Dvorak <rakdver@gcc.gnu.org>2007-03-12 21:56:12 +0000
committerZdenek Dvorak <rakdver@gcc.gnu.org>2007-03-12 21:56:12 +0000
commitfbb0d4f87836abb8c0fee3ac8308c80460ecef8c (patch)
treee514ce3f0e370009d38ad96a7e1a8faf711baef9 /gcc/lambda-code.c
parentdc5bbad332834841c4e5016db3245cff1d096638 (diff)
downloadgcc-fbb0d4f87836abb8c0fee3ac8308c80460ecef8c.zip
gcc-fbb0d4f87836abb8c0fee3ac8308c80460ecef8c.tar.gz
gcc-fbb0d4f87836abb8c0fee3ac8308c80460ecef8c.tar.bz2
re PR middle-end/30835 (ICE with -O2 -ftree-loop-linear)
PR tree-optimization/30835 * lambda-code.c (can_convert_to_perfect_nest): Check whether bb_for_stmt is not NULL before accessing it. From-SVN: r122866
Diffstat (limited to 'gcc/lambda-code.c')
-rw-r--r--gcc/lambda-code.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c
index d763266..487c646 100644
--- a/gcc/lambda-code.c
+++ b/gcc/lambda-code.c
@@ -2363,8 +2363,9 @@ can_convert_to_perfect_nest (struct loop *loop)
{
tree arg_stmt = SSA_NAME_DEF_STMT (arg);
- if (bb_for_stmt (arg_stmt)->loop_father
- == loop->inner)
+ if (bb_for_stmt (arg_stmt)
+ && (bb_for_stmt (arg_stmt)->loop_father
+ == loop->inner))
goto fail;
}
}