decl.c (gnat_to_gnu_entity): Copy the TYPE_PACKED flag from the base type.
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 25 Mar 2012 17:21:49 +0000 (17:21 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 25 Mar 2012 17:21:49 +0000 (17:21 +0000)
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Copy
the TYPE_PACKED flag from the base type.

From-SVN: r185782

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

index 9a1f871b9ddcc8d4fabb26b569afdacee56f293e..7b8832d299278fba4c872e7f400ff8a875700617 100644 (file)
@@ -1,3 +1,8 @@
+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.
index abd5185e7049574956fefd9683b0d914ae34c503..b925f422a21bf8f60b8f748722411762682240c9 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.  */