From 3ae9d95322f3859298b77a306f38e70dbcb34194 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 21 May 2018 14:50:17 +0000 Subject: [PATCH] [Ada] Unnest all subprograms relevant for code generation 2018-05-21 Arnaud Charlet gcc/ada/ * exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for code generation. From-SVN: r260446 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/exp_unst.adb | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 765af4e438c..f74cf3f2d79 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-04-04 Arnaud Charlet + + * exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for + code generation. + 2018-04-04 Piotr Trojanek * lib.ads: Fix typo in enumeration in comment. diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb index 6403bdb2def..c63d2281e20 100644 --- a/gcc/ada/exp_unst.adb +++ b/gcc/ada/exp_unst.adb @@ -312,9 +312,9 @@ package body Exp_Unst is return; end if; - -- At least for now, do not unnest anything but main source unit + -- Only unnest when generating code for the main source unit - if not In_Extended_Main_Source_Unit (Subp_Body) then + if not In_Extended_Main_Code_Unit (Subp_Body) then return; end if; @@ -1556,7 +1556,7 @@ package body Exp_Unst is -- from level STJR.Lev to level STJE.Lev. The general form of -- the rewritten reference for entity X is: - -- Typ'Deref (ARECaF.ARECbU.ARECcU.ARECdU....ARECm.X) + -- Typ'Deref (ARECaF.ARECbU.ARECcU.ARECdU....ARECmU.X) -- where a,b,c,d .. m = -- STJR.Lev - 1, STJR.Lev - 2, .. STJE.Lev -- 2.30.2