gengenrtl.c (gencode): Always use bzero to clear memory instead of dangerous casts...
authorJeffrey A Law <law@cygnus.com>
Sat, 26 Dec 1998 09:31:42 +0000 (09:31 +0000)
committerJeff Law <law@gcc.gnu.org>
Sat, 26 Dec 1998 09:31:42 +0000 (02:31 -0700)
        * gengenrtl.c (gencode): Always use bzero to clear memory instead
        of dangerous casts and stores.
Fixes alpha & sparc -O3 bootstrap problems.

From-SVN: r24420

gcc/ChangeLog
gcc/gengenrtl.c

index be77325f72337fa225a9ce17b1b15829b4ddb72d..74c156b7ddfb123c6706fc66ab9dc9babe276260 100644 (file)
@@ -1,5 +1,8 @@
 Sat Dec 26 09:17:04 1998  Jeffrey A Law  (law@cygnus.com)
 
+       * gengenrtl.c (gencode): Always use bzero to clear memory instead
+       of dangerous casts and stores.
+
        * Makefile.in (compare, gnucompare): Add missing else true clauses.
 
 Fri Dec 25 23:00:56 1998  Jeffrey A Law  (law@cygnus.com)
index e99cb723e843b618d6e245ea1bd45f6f35acf752..b9455cb7c1c72be9f3bcf2baa27a227a1bae51ab 100644 (file)
@@ -268,12 +268,7 @@ gencode (f)
   fputs ("static rtx obstack_alloc_rtx (length)\n", f);
   fputs ("     register int length;\n{\n", f);
   fputs ("  rtx rt = (rtx) obstack_alloc (rtl_obstack, length);\n\n", f);
-  fputs ("  if (sizeof(struct rtx_def) - sizeof(rtunion) == sizeof(int))\n", f);
-  fputs ("    *(int *)rt = 0;\n", f);
-  fputs ("  else if (sizeof(struct rtx_def) - sizeof(rtunion) == sizeof(HOST_WIDE_INT))\n", f);
-  fputs ("    *(HOST_WIDE_INT *)rt = 0;\n", f);
-  fputs ("  else\n", f);
-  fputs ("    bzero((char *) rt, sizeof(struct rtx_def) - sizeof(rtunion));\n\n", f);
+  fputs ("  bzero((char *) rt, sizeof(struct rtx_def) - sizeof(rtunion));\n\n", f);
   fputs ("  return rt;\n}\n\n", f);
 
   for (fmt = formats; *fmt; ++fmt)