[Ada] Fix ICE in ASIS mode

Message ID 201308132158.27030.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou Aug. 13, 2013, 7:58 p.m.
This disconnects a good chunk of the alias set circuitry in ASIS mode because
it was bypassing kludges put in place for this mode specifically.

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

2013-08-13  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
	sets of derived types in ASIS mode.


Index: gcc-interface/decl.c
--- gcc-interface/decl.c	(revision 201704)
+++ gcc-interface/decl.c	(working copy)
@@ -5153,7 +5153,7 @@  gnat_to_gnu_entity (Entity_Id gnat_entit
 	 to conflict with Comp2 and an alias set copy is required.
 	 The language rules ensure the parent type is already frozen here.  */
-      if (Is_Derived_Type (gnat_entity))
+      if (Is_Derived_Type (gnat_entity) && !type_annotate_only)
 	  tree gnu_parent_type = gnat_to_gnu_type (Etype (gnat_entity));
 	  relate_alias_sets (gnu_type, gnu_parent_type,