* tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Bail out at NULL tree refs.

From-SVN: r186693
This commit is contained in:
Jan Hubicka 2012-04-23 12:04:48 +02:00 committed by Jan Hubicka
parent f67b870a8e
commit 837a549ba8
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2012-04-22 Jan Hubicka <jh@suse.cz>
* tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Bail out at NULL tree refs.
2012-04-22 Jan Hubicka <jh@suse.cz>
* lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags.

View File

@ -1411,7 +1411,8 @@ expr_invariant_in_loop_p (struct loop *loop, tree expr)
len = TREE_OPERAND_LENGTH (expr);
for (i = 0; i < len; i++)
if (!expr_invariant_in_loop_p (loop, TREE_OPERAND (expr, i)))
if (TREE_OPERAND (expr, i)
&& !expr_invariant_in_loop_p (loop, TREE_OPERAND (expr, i)))
return false;
return true;