summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-12-12 17:44:23 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2011-12-12 17:44:23 +0100
commitc79be1dc34dd39f6a58aad45a92d39f7bb3a0534 (patch)
tree9bceeac18d32564901706deccb1db4031d379b82 /gcc
parent431e1124edfc6ac99951af5286190d92c983354d (diff)
downloadgcc-c79be1dc34dd39f6a58aad45a92d39f7bb3a0534.tar.gz
re PR middle-end/51510 (gcc for arm-linux-gnueabi ICEs on gcc.c-torture/execute/20050713-1.c due to PR50074+PR51323 fix)
PR middle-end/51510 * calls.c (internal_arg_pointer_based_exp_scan): Don't use VEC_safe_grow_cleared if idx is smaller than VEC_length. From-SVN: r182246
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/calls.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d02c8df3eb2..88b45d8fffe 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/51510
+ * calls.c (internal_arg_pointer_based_exp_scan): Don't use
+ VEC_safe_grow_cleared if idx is smaller than VEC_length.
+
2011-12-12 Richard Sandiford <richard.sandiford@linaro.org>
PR middle-end/50873
diff --git a/gcc/calls.c b/gcc/calls.c
index 95369b7baef..0ef0cad8d27 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -1705,9 +1705,11 @@ internal_arg_pointer_based_exp_scan (void)
val = internal_arg_pointer_based_exp (SET_SRC (set), false);
if (val != NULL_RTX)
{
- VEC_safe_grow_cleared (rtx, heap,
- internal_arg_pointer_exp_state.cache,
- idx + 1);
+ if (idx
+ >= VEC_length (rtx, internal_arg_pointer_exp_state.cache))
+ VEC_safe_grow_cleared (rtx, heap,
+ internal_arg_pointer_exp_state.cache,
+ idx + 1);
VEC_replace (rtx, internal_arg_pointer_exp_state.cache,
idx, val);
}