The compiler blows up generating the callgraph output of SPARK ghost
subprograms whose contracts invoke ghost functions.
2018-08-21 Javier Miranda <miranda@adacore.com>
gcc/ada/
* exp_cg.adb (Generate_CG_Output): Handle calls removed by the
expander.
From-SVN: r263722
+2018-08-21 Javier Miranda <miranda@adacore.com>
+
+ * exp_cg.adb (Generate_CG_Output): Handle calls removed by the
+ expander.
+
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* layout.adb: Do not set size of access subprogram if unnesting.
for J in Call_Graph_Nodes.First .. Call_Graph_Nodes.Last loop
N := Call_Graph_Nodes.Table (J);
- if Nkind (N) in N_Subprogram_Call then
+ -- No action needed for subprogram calls removed by the expander
+ -- (for example, calls to ignored ghost entities).
+
+ if Nkind (N) = N_Null_Statement then
+ pragma Assert (Nkind (Original_Node (N)) in N_Subprogram_Call);
+ null;
+
+ elsif Nkind (N) in N_Subprogram_Call then
Write_Call_Info (N);
else pragma Assert (Nkind (N) = N_Defining_Identifier);