* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Copy
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 25 Mar 2012 17:21:49 +0000 (17:21 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 25 Mar 2012 17:21:49 +0000 (17:21 +0000)
the TYPE_PACKED flag from the base type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185782 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c

index 9a1f871..7b8832d 100644 (file)
@@ -1,5 +1,10 @@
 2012-03-25  Eric Botcazou  <ebotcazou@adacore.com>
 
+       * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Copy
+       the TYPE_PACKED flag from the base type.
+
+2012-03-25  Eric Botcazou  <ebotcazou@adacore.com>
+
        * gcc-interface/decl.c (SS_MARK_NAME): New define.
        (gnat_to_gnu_entity) <E_Function>: Prepend leaf attribute on entities
        whose name is SS_MARK_NAME.
index abd5185..b925f42 100644 (file)
@@ -3263,6 +3263,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
 
              gnu_type = make_node (RECORD_TYPE);
              TYPE_NAME (gnu_type) = gnu_entity_name;
+             TYPE_PACKED (gnu_type) = TYPE_PACKED (gnu_base_type);
 
              /* Set the size, alignment and alias set of the new type to
                 match that of the old one, doing required substitutions.  */