diff mbox

[Ada] Fix ICE on corner case in Ada.Iterator_Interfaces

Message ID 6005542.MIV3NSikiH@polaris
State New
Headers show

Commit Message

Eric Botcazou May 15, 2017, 8:38 a.m. UTC
Tested on x86_64-suse-linux, applied on the mainline.


2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
	types not coming from a limited context.
diff mbox

Patch

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))