From 61c1a609ee0019524d94b384eaf8159eadb9a555 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 14 Aug 2013 04:44:37 +0000 Subject: [PATCH] ipa-inline-analysis.c (add_clause): Avoid shifting integer NUM_CONDITIONS bit positions. * ipa-inline-analysis.c (add_clause): Avoid shifting integer NUM_CONDITIONS bit positions. From-SVN: r201719 --- gcc/ChangeLog | 5 +++++ gcc/ipa-inline-analysis.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 45d4971fa71..8dc071d7961 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-08-14 Marek Polacek + + * ipa-inline-analysis.c (add_clause): Avoid shifting integer + NUM_CONDITIONS bit positions. + 2013-08-13 Cary Coutant * dwarf2out.c (CHECKSUM_BLOCK): New macro. diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index 2f30797443a..806b219c228 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -337,7 +337,7 @@ add_clause (conditions conditions, struct predicate *p, clause_t clause) and thus there is no point for looking for them. */ if (cc1->code == CHANGED || cc1->code == IS_NOT_CONSTANT) continue; - for (c2 = c1 + 1; c2 <= NUM_CONDITIONS; c2++) + for (c2 = c1 + 1; c2 < NUM_CONDITIONS; c2++) if (clause & (1 << c2)) { condition *cc1 = -- 2.30.2