diff mbox

[Ada] Fix crash in ASIS mode

Message ID 1930962.F0aqdC5zD6@polaris
State New
Headers show

Commit Message

Eric Botcazou Sept. 18, 2013, 10:34 a.m. UTC
Tested on x86_64-suse-linux, applied on the mainline.


2013-09-18  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: New.
diff mbox

Patch

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