[Ada] Unnest all subprograms relevant for code generation
authorArnaud Charlet <charlet@adacore.com>
Mon, 21 May 2018 14:50:17 +0000 (14:50 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 21 May 2018 14:50:17 +0000 (14:50 +0000)
2018-05-21  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

* exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
code generation.

From-SVN: r260446

gcc/ada/ChangeLog
gcc/ada/exp_unst.adb

index 765af4e..f74cf3f 100644 (file)
@@ -1,3 +1,8 @@
+2018-04-04  Arnaud Charlet  <charlet@adacore.com>
+
+       * exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
+       code generation.
+
 2018-04-04  Piotr Trojanek  <trojanek@adacore.com>
 
        * lib.ads: Fix typo in enumeration in comment.
index 6403bdb..c63d228 100644 (file)
@@ -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