diff mbox

[Ada] Minor tweak in gnat_to_gnu_entity

Message ID 201203251920.46241.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou March 25, 2012, 5:20 p.m. UTC
This has probably no effects in practice, but for the sake of consistency...

Tested on i586-suse-linux, applied on the mainline.


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.
diff mbox

Patch

Index: gcc-interface/decl.c
===================================================================
--- gcc-interface/decl.c	(revision 185780)
+++ gcc-interface/decl.c	(working copy)
@@ -3263,6 +3263,7 @@  gnat_to_gnu_entity (Entity_Id gnat_entit
 
 	      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.  */