Tested on x86_64-suse-linux, applied on the mainline.
2017-05-15 Eric Botcazou <ebotca...@adacore.com>
* gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
types not coming from a limited context.
--
Eric Botcazou
Index: gcc-interface/trans.c
===================================================================
--- gcc-interface/trans.c (revision 248051)
+++ gcc-interface/trans.c (working copy)
@@ -1044,7 +1044,7 @@ Identifier_to_gnu (Node_Id gnat_node, tr
&& (Etype (gnat_node)
== Packed_Array_Impl_Type (gnat_temp_type)))
|| (Is_Class_Wide_Type (Etype (gnat_node)))
- || (IN (Ekind (gnat_temp_type), Private_Kind)
+ || (IN (Ekind (gnat_temp_type), Incomplete_Or_Private_Kind)
&& Present (Full_View (gnat_temp_type))
&& ((Etype (gnat_node) == Full_View (gnat_temp_type))
|| (Is_Packed (Full_View (gnat_temp_type))