]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gcse.c: Remove an obsolete comment.
authorKazu Hirata <kazu@cs.umass.edu>
Mon, 21 Feb 2005 02:02:19 +0000 (02:02 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Mon, 21 Feb 2005 02:02:19 +0000 (02:02 +0000)
From-SVN: r95319

gcc/ChangeLog
gcc/cse.c

index 33f411f936dea8060e2bd3b1b7e0301307fbd800..881f157122f918df8069fa462ba2b2e5132216fe 100644 (file)
@@ -2,6 +2,8 @@
 
        * gcse.c: Remove an obsolete comment.
 
+       * cse.c (init_cse_reg_info): Use xmalloc instead of xrealloc.
+
 2005-02-20  Hans-Peter Nilsson  <hp@axis.com>
 
        * doc/extend.texi (Function Attributes) <Attribute const>: The
index e9f6c2f4724fd72cccb6bbbc6c27ce2910db22bf..e16113c68b8feb592812c1203aee7f85c83bd496 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -864,10 +864,12 @@ init_cse_reg_info (unsigned int nregs)
        }
 
       /* Reallocate the table with NEW_SIZE entries.  */
-      cse_reg_info_table = xrealloc (cse_reg_info_table,
-                                    (sizeof (struct cse_reg_info)
-                                     * new_size));
+      if (cse_reg_info_table)
+       free (cse_reg_info_table);
+      cse_reg_info_table = xmalloc (sizeof (struct cse_reg_info)
+                                    * new_size);
       cse_reg_info_table_size = new_size;
+      cse_reg_info_table_first_uninitialized = 0;
     }
 
   /* Do we have all of the first NREGS entries initialized?  */