diff mbox

[Ada] Fix minor ICE with -gnatct

Message ID 1838334.x3LDKONDz9@polaris
State New
Headers show

Commit Message

Eric Botcazou March 16, 2015, 9:15 a.m. UTC
A short-circuit was added in gigi for E_Abstract_State but it results in an 
unbalanced handling of the context.

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


2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
	short-circuit the regular handling.
diff mbox

Patch

Index: gcc-interface/decl.c
===================================================================
--- gcc-interface/decl.c	(revision 221407)
+++ gcc-interface/decl.c	(working copy)
@@ -4800,9 +4800,11 @@  gnat_to_gnu_entity (Entity_Id gnat_entit
 
     case E_Abstract_State:
       /* This is a SPARK annotation that only reaches here when compiling in
-	 ASIS mode and has no characteristics to annotate.  */
+	 ASIS mode.  */
       gcc_assert (type_annotate_only);
-      return error_mark_node;
+      gnu_decl = error_mark_node;
+      saved = true;
+      break;
 
     default:
       gcc_unreachable ();