This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] Fix crash on renaming of unconstrained array in ASIS mode
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 24 Nov 2015 09:52:58 +0100
- Subject: [Ada] Fix crash on renaming of unconstrained array in ASIS mode
- Authentication-results: sourceware.org; auth=none
This fixes a crash in an obscure case in ASIS mode.
Tested on x86-64/Linux, applied on the mainline.
2015-11-24 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (gnat_to_gnu): In type_annotate_only mode, do
not build a NULL_EXPR for an N_Expanded_Name.
--
Eric Botcazou
Index: gcc-interface/trans.c
===================================================================
--- gcc-interface/trans.c (revision 230786)
+++ gcc-interface/trans.c (working copy)
@@ -5734,6 +5734,7 @@ gnat_to_gnu (Node_Id gnat_node)
types, make this into a NULL_EXPR. */
if (type_annotate_only
&& IN (kind, N_Subexpr)
+ && kind != N_Expanded_Name
&& kind != N_Identifier
&& !Compile_Time_Known_Value (gnat_node))
return build1 (NULL_EXPR, get_unpadded_type (Etype (gnat_node)),