diff options
author | Arnaud Charlet <charlet@adacore.com> | 2019-12-13 09:05:38 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-12-13 09:05:38 +0000 |
commit | 9531aef54f34b65aab0efe92a713d0f825b6cefe (patch) | |
tree | 6ded3e342e6eb682becc3c6c25dc927c7f43194d /gcc/ada | |
parent | e203dd6e24ebb349128e3a4354e5847a90422c64 (diff) | |
download | gcc-9531aef54f34b65aab0efe92a713d0f825b6cefe.zip gcc-9531aef54f34b65aab0efe92a713d0f825b6cefe.tar.gz gcc-9531aef54f34b65aab0efe92a713d0f825b6cefe.tar.bz2 |
[Ada] Unnesting and annex E
2019-12-13 Arnaud Charlet <charlet@adacore.com>
gcc/ada/
* exp_unst.adb (Unnest_Subprogram): Account for trees produced
by Annex E constructs.
From-SVN: r279367
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/exp_unst.adb | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index cfa051a..d48a361 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-12-13 Arnaud Charlet <charlet@adacore.com> + + * exp_unst.adb (Unnest_Subprogram): Account for trees produced + by Annex E constructs. + 2019-12-13 Ghjuvan Lacambre <lacambre@adacore.com> * doc/gnat_rm/implementation_defined_pragmas.rst: Update diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb index f016d2f..1747281 100644 --- a/gcc/ada/exp_unst.adb +++ b/gcc/ada/exp_unst.adb @@ -414,11 +414,14 @@ package body Exp_Unst is then return; - -- Only unnest when generating code for the main source unit or if we're - -- unnesting for inline. + -- Only unnest when generating code for the main source unit or if + -- we're unnesting for inline. But in some Annex E cases the Sloc + -- points to a different unit, so also make sure that the Parent + -- isn't in something that we know we're generating code for. elsif not For_Inline and then not In_Extended_Main_Code_Unit (Subp_Body) + and then not In_Extended_Main_Code_Unit (Parent (Subp_Body)) then return; end if; |