re PR lto/42037 ("grow domain error" in lto1)
authorRichard Guenther <rguenther@suse.de>
Fri, 11 Dec 2009 15:52:57 +0000 (15:52 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 11 Dec 2009 15:52:57 +0000 (15:52 +0000)
2009-12-11  Richard Guenther  <rguenther@suse.de>

PR lto/42037
* lto.c (lto_resolution_read): Properly grow the vector.

From-SVN: r155166

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

index a7c4b3b6c43f618664855431a3a025fd6449fedf..72d180a02512f5d1b77ec25053dbb02515b135c3 100644 (file)
@@ -1,3 +1,8 @@
+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
index 4d7c3079b49357520147095a1d364c1214edb731..c7ac7c32e1534d84a2c4f595588de5d9758d219e 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);
     }