OSDN Git Service

2009-12-11 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 Dec 2009 15:52:57 +0000 (15:52 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 Dec 2009 15:52:57 +0000 (15:52 +0000)
PR lto/42037
* lto.c (lto_resolution_read): Properly grow the vector.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155166 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/lto/ChangeLog
gcc/lto/lto.c

index a7c4b3b..72d180a 100644 (file)
@@ -1,5 +1,10 @@
 2009-12-11  Richard Guenther  <rguenther@suse.de>
 
+       PR lto/42037
+       * lto.c (lto_resolution_read): Properly grow the vector.
+
+2009-12-11  Richard Guenther  <rguenther@suse.de>
+
        PR lto/41915
        * lto-lang.c (lto_init_options): Initialize flag_complex_method
        to the C99 default.  Do not set flag_unit_at_a_time.
index 4d7c307..c7ac7c3 100644 (file)
@@ -344,7 +344,7 @@ lto_resolution_read (FILE *resolution, lto_file *file)
        internal_error ("Invalid resolution in the resolution file.");
 
       VEC_safe_grow_cleared (ld_plugin_symbol_resolution_t, heap, ret,
-                            index + 1);
+                            max_index + 1);
       VEC_replace (ld_plugin_symbol_resolution_t, ret, index, r);
     }