diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-04-20 11:14:02 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-04-20 11:14:02 +0200 |
commit | 31ae1b4629ed84e4dd0ba7ac4f94181ab197041f (patch) | |
tree | d671cff63143ce6c618c5b9b30e2b7e5fb3bb45d /gcc/ada/exp_ch6.adb | |
parent | 1ba563f5f9ba42ccbb36f4201bcbbe0c807ae26e (diff) | |
download | gcc-31ae1b4629ed84e4dd0ba7ac4f94181ab197041f.zip gcc-31ae1b4629ed84e4dd0ba7ac4f94181ab197041f.tar.gz gcc-31ae1b4629ed84e4dd0ba7ac4f94181ab197041f.tar.bz2 |
[multiple changes]
2016-04-20 Arnaud Charlet <charlet@adacore.com>
* snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
indentation.
* sem_util.adb (Is_Unchecked_Conversion_Instance):
defense against library-level renamings of other functions,
which are never instances of Unchecked_Conversion.
* einfo.ads: minor fix of casing in comment
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
that has been analyzed and expanded already. Qualify the names
in the proper body for use in the generation of C code.
From-SVN: r235244
Diffstat (limited to 'gcc/ada/exp_ch6.adb')
-rw-r--r-- | gcc/ada/exp_ch6.adb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 5675623..511f479 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -5521,10 +5521,23 @@ package body Exp_Ch6 is ----------------------------------- procedure Expand_N_Subprogram_Body_Stub (N : Node_Id) is + Bod : Node_Id; begin if Present (Corresponding_Body (N)) then - Expand_N_Subprogram_Body ( - Unit_Declaration_Node (Corresponding_Body (N))); + Bod := Unit_Declaration_Node (Corresponding_Body (N)); + + -- The body may have been expanded already when it is analyzed + -- through the subunit node. Do no expand again: it interferes + -- with the construction of unnesting tables when generating C. + + if not Analyzed (Bod) then + Expand_N_Subprogram_Body (Bod); + end if; + + -- Add full qualification to entities that may be created late + -- during unnesting. + + Qualify_Entity_Names (N); end if; end Expand_N_Subprogram_Body_Stub; |