init.c (init_init_processing): Header information for arrays allocated via `new'...
authorDiego Novillo <dnovillo@cygnus.com>
Thu, 11 Nov 1999 19:43:02 +0000 (19:43 +0000)
committerDiego Novillo <dnovillo@gcc.gnu.org>
Thu, 11 Nov 1999 19:43:02 +0000 (14:43 -0500)
* gcc/cp/init.c (init_init_processing): Header information for
arrays allocated via `new' should have the same alignment used by
malloc.

From-SVN: r30491

gcc/ChangeLog
gcc/cp/init.c

index acf4ae3e980939d1f0b4be43a9bb7ab07e27930d..4cedaf34bc75669e2b3ff873d17f855731b2b26d 100644 (file)
@@ -1,3 +1,9 @@
+Thu Nov 11 12:42:11 MST 1999   Diego Novillo <dnovillo@cygnus.com>
+
+       * gcc/cp/init.c (init_init_processing): Header information for
+       arrays allocated via `new' should have the same alignment used by
+       malloc.
+
 1999-11-11  Bruce Korb  <autogen@linuxbox.com>
 
        * fixinc/fixincl.c: Added verbose levels for status messages
index 07c45f46cb6912aaf30ea3a912ca535a29d18bc9..c44926ded1839097f97b8f0992c9d27d322bcada 100644 (file)
@@ -66,8 +66,9 @@ void init_init_processing ()
   BI_header_type = make_lang_type (RECORD_TYPE);
   nelts_identifier = get_identifier ("nelts");
   fields[0] = build_lang_decl (FIELD_DECL, nelts_identifier, sizetype);
+  TYPE_ALIGN (BI_header_type) = BIGGEST_ALIGNMENT;
   finish_builtin_type (BI_header_type, "__new_cookie", fields,
-                      0, double_type_node);
+                      0, BI_header_type);
   BI_header_size = size_in_bytes (BI_header_type);
 
   ggc_add_tree_root (&BI_header_type, 1);