]> gcc.gnu.org Git - gcc.git/commitdiff
* trans-io.c (gfc_build_io_library_fndecls): Align pad.
authorSteve Ellcey <sje@cup.hp.com>
Tue, 18 Apr 2006 16:05:42 +0000 (16:05 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Tue, 18 Apr 2006 16:05:42 +0000 (16:05 +0000)
From-SVN: r113047

gcc/fortran/ChangeLog
gcc/fortran/trans-io.c

index 05e25db75502f0290c7320260a51db9592047630..01b8071b78f74af51a6c0ace950542e622d18072 100644 (file)
@@ -1,3 +1,7 @@
+2006-04-18  Steve Ellcey  <sje@cup.hp.com>
+
+       * trans-io.c (gfc_build_io_library_fndecls): Align pad.
+
 2006-04-16  Thomas Koenig  <Thomas.Koenig@online.de>
 
        PR fortran/26017
index 9a6016148e7cacf0d7162967d5de54fbb9abb7de..b4c83f49f86fb2d180e3e3653bf7eed8e7a42344 100644 (file)
@@ -227,6 +227,14 @@ gfc_build_io_library_fndecls (void)
   pad_size += 32 * TREE_INT_CST_LOW (TYPE_SIZE_UNIT (integer_type_node));
   pad_idx = build_index_type (build_int_cst (NULL_TREE, pad_size));
   types[IOPARM_type_pad] = build_array_type (char_type_node, pad_idx);
+
+  /* pad actually contains pointers and integers so it needs to have an
+     alignment that is at least as large as the needed alignment for those
+     types.  See the st_parameter_dt structure in libgfortran/io/io.h for
+     what really goes into this space.  */
+  TYPE_ALIGN (types[IOPARM_type_pad]) = MAX (TYPE_ALIGN (pchar_type_node),
+                    TYPE_ALIGN (gfc_get_int_type (gfc_max_integer_kind)));
+
   gfc_c_int_type_node = gfc_get_int_type (gfc_c_int_kind);
 
   for (ptype = IOPARM_ptype_common; ptype < IOPARM_ptype_num; ptype++)
This page took 0.062965 seconds and 5 git commands to generate.