This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]