diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-09-10 15:56:18 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-09-10 15:56:18 +0200 |
commit | b636db2e16616aeba2b0db14b0b9c4cd7ee0190c (patch) | |
tree | bf8122ccdc6c1f0d22cb7e09475e9e0ecfbd376f /gcc/ada/exp_cg.adb | |
parent | a113c55d5aaa0764c6455405f3235abe14a74320 (diff) | |
download | gcc-b636db2e16616aeba2b0db14b0b9c4cd7ee0190c.tar.gz |
[multiple changes]
2010-09-10 Jose Ruiz <ruiz@adacore.com>
* exp_cg.adb (Is_Predefined_Dispatching_Operation): When trying the
pattern matching to detect predefined primitive operations take into
account that there can be an extra suffix related to body-nested
package entities.
2010-09-10 Ed Schonberg <schonberg@adacore.com>
* s-pooglo.ads: Add overriding indicators.
From-SVN: r164177
Diffstat (limited to 'gcc/ada/exp_cg.adb')
-rw-r--r-- | gcc/ada/exp_cg.adb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ada/exp_cg.adb b/gcc/ada/exp_cg.adb index 14d13908292..376f9cadf60 100644 --- a/gcc/ada/exp_cg.adb +++ b/gcc/ada/exp_cg.adb @@ -265,9 +265,25 @@ package body Exp_CG is Name_uDisp_Requeue, Name_uDisp_Timed_Select); - Suffix_Length : constant Natural := Homonym_Suffix_Length (E); + Suffix_Length : Natural; begin + -- Search for and strip suffix for body-nested package entities + + Suffix_Length := Homonym_Suffix_Length (E); + for J in reverse Full_Name'First + 2 .. Full_Name'Last loop + if Full_Name (J) = 'X' then + + -- Include the "X", "Xb", "Xn", ... in the part of the + -- suffix to be removed. + + Suffix_Length := Suffix_Length + Full_Name'Last - J + 1; + exit; + end if; + + exit when Full_Name (J) /= 'b' and then Full_Name (J) /= 'n'; + end loop; + for J in Predef_Names_95'Range loop Get_Name_String (Predef_Names_95 (J)); |