+2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
+ Look at the underlying type for the signedness of the type.
+
2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Deal specially
&& esize == CHAR_TYPE_SIZE
&& flag_signed_char)
gnu_type = make_signed_type (CHAR_TYPE_SIZE);
- else if (Is_Unsigned_Type (Etype (gnat_entity))
+ else if (Is_Unsigned_Type (Underlying_Type (Etype (gnat_entity)))
|| (Esize (Etype (gnat_entity)) != Esize (gnat_entity)
&& Is_Unsigned_Type (gnat_entity))
|| Has_Biased_Representation (gnat_entity))
+2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/address_conv.adb: New test.
+
2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/renaming11.ad[sb]: New test.
--- /dev/null
+-- { dg-do compile }
+
+with System.Storage_Elements; use System.Storage_Elements;
+
+procedure Address_Conv is
+
+ subtype My_Address is System.Address;
+
+ type Rec is record
+ A : My_Address;
+ end record;
+
+ Addr : constant My_Address := To_Address (16#FACEFACE#);
+
+ R : constant Rec := (A => Addr);
+
+begin
+ null;
+end;