Commit 4453a822 by Eric Botcazou Committed by Pierre-Marie de Rodat

[Ada] ICE on array of task type with -gnatct

2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Task_Type>: In
	-gnatct mode, process the discriminants only for a definition.

From-SVN: r264610
parent 81d85d4b
2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Task_Type>: In
-gnatct mode, process the discriminants only for a definition.
2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (List_Record_Layout): Be prepared for JSON output.
(List_Record_Info): Use the flat representation for record
subtypes in the JSON format.
......
......@@ -4158,7 +4158,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
part of the associated body so they need to be translated. */
if (type_annotate_only && gnat_equiv_type == gnat_entity)
{
if (Has_Discriminants (gnat_entity)
if (definition
&& Has_Discriminants (gnat_entity)
&& Root_Type (gnat_entity) == gnat_entity)
{
tree gnu_field_list = NULL_TREE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment