]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Unnesting: ensure Current_Subprogram is always initialized
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Dec 2018 11:11:53 +0000 (11:11 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Dec 2018 11:11:53 +0000 (11:11 +0000)
2018-12-11  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

* exp_unst.adb (Unnest_Subprogram): Ensure Current_Subprogram is
always initialized.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267009 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 1fd528ccaf570278bf7e007f53194e97ce91d63b..7f020e39b56ac7f6b8d5b49ee1b83fa12d877431 100644 (file)
@@ -1,3 +1,8 @@
+2018-12-11  Arnaud Charlet  <charlet@adacore.com>
+
+       * exp_unst.adb (Unnest_Subprogram): Ensure Current_Subprogram is
+       always initialized.
+
 2018-12-11  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/decl.c (gnat_to_gnu_entity): Add
index 57b2a9e190c65e78b354f4b86dec1d6de0321cd0..f8c8fd56be1181c2fb0bd3736cca374b325f1aaf 100644 (file)
@@ -440,7 +440,7 @@ package body Exp_Unst is
       Urefs.Init;
 
       Build_Tables : declare
-         Current_Subprogram : Entity_Id;
+         Current_Subprogram : Entity_Id := Empty;
          --  When we scan a subprogram body, we set Current_Subprogram to the
          --  corresponding entity. This gets recursively saved and restored.