> Thanks, that at least fixes tasking.

Great, here's what I have installed on the mainline (it only affects the Ada 
compiler) after testing on x86-64/Linux, Aarch64/Linux and SPARC/Solaris.


2017-04-03  Eric Botcazou  <ebotca...@adacore.com>

        * tree-nested.c (get_descriptor_type): Make sure that the alignment
        of descriptors is at least equal to that of functions.

-- 
Eric Botcazou
Index: tree-nested.c
===================================================================
--- tree-nested.c	(revision 246276)
+++ tree-nested.c	(working copy)
@@ -496,6 +496,8 @@ static GTY(()) tree descriptor_type;
 static tree
 get_descriptor_type (struct nesting_info *info)
 {
+  /* The base alignment is that of a function.  */
+  const unsigned align = FUNCTION_ALIGNMENT (FUNCTION_BOUNDARY);
   tree t;
 
   if (descriptor_type)
@@ -505,6 +507,8 @@ get_descriptor_type (struct nesting_info
   t = build_array_type (ptr_type_node, t);
   t = build_decl (DECL_SOURCE_LOCATION (info->context),
 		  FIELD_DECL, get_identifier ("__data"), t);
+  SET_DECL_ALIGN (t, MAX (TYPE_ALIGN (ptr_type_node), align));
+  DECL_USER_ALIGN (t) = 1;
 
   descriptor_type = make_node (RECORD_TYPE);
   TYPE_NAME (descriptor_type) = get_identifier ("__builtin_descriptor");

Reply via email to