aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/gcc/ira-int.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.6/gcc/ira-int.h')
-rw-r--r--gcc-4.6/gcc/ira-int.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc-4.6/gcc/ira-int.h b/gcc-4.6/gcc/ira-int.h
index 049a07f89..a58f0ca0c 100644
--- a/gcc-4.6/gcc/ira-int.h
+++ b/gcc-4.6/gcc/ira-int.h
@@ -1123,8 +1123,13 @@ static inline bool
ira_allocno_object_iter_cond (ira_allocno_object_iterator *i, ira_allocno_t a,
ira_object_t *o)
{
- *o = ALLOCNO_OBJECT (a, i->n);
- return i->n++ < ALLOCNO_NUM_OBJECTS (a);
+ int n = i->n++;
+ if (n < ALLOCNO_NUM_OBJECTS (a))
+ {
+ *o = ALLOCNO_OBJECT (a, n);
+ return true;
+ }
+ return false;
}
/* Loop over all objects associated with allocno A. In each