This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix oversight in compute_complex_ancestor_jump_func()
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: mjambor at suse dot cz, Segher Boessenkool <segher at kernel dot crashing dot org>
- Date: Thu, 20 May 2010 15:08:46 +0200
- Subject: [PATCH] Fix oversight in compute_complex_ancestor_jump_func()
This caused breakage in sched.c on building pretty much any Linux
kernel. Okay to apply?
Segher
gcc/ChangeLog
2010-05-20 Segher Boessenkool <segher@kernel.crashing.org>
* ipa-prop.c (compute_complex_ancestor_jump_func): Bail
out if !cond.
---
gcc/ipa-prop.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index d977242..db2a470 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -576,7 +576,8 @@ compute_complex_ancestor_jump_func (struct ipa_node_params *info,
cond_bb = single_pred (assign_bb);
cond = last_stmt (cond_bb);
- if (gimple_code (cond) != GIMPLE_COND
+ if (!cond
+ || gimple_code (cond) != GIMPLE_COND
|| gimple_cond_code (cond) != NE_EXPR
|| gimple_cond_lhs (cond) != parm
|| !integer_zerop (gimple_cond_rhs (cond)))
--
1.7.0.2.183.g14cec