aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_elim.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-06-18 12:19:44 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-18 12:19:44 +0200
commitfcfb981b1a4e9a859a3cad5a34e963d74aeca468 (patch)
treede1611efdafdfe9b61b3603d268702c9bb294dd7 /gcc/ada/sem_elim.adb
parent48b351d92433bfa82001f4b91f6d51fa017a7b95 (diff)
downloadgcc-fcfb981b1a4e9a859a3cad5a34e963d74aeca468.zip
gcc-fcfb981b1a4e9a859a3cad5a34e963d74aeca468.tar.gz
gcc-fcfb981b1a4e9a859a3cad5a34e963d74aeca468.tar.bz2
[multiple changes]
2010-06-18 Geert Bosch <bosch@adacore.com> * i-forbla-darwin.adb: Include -lgnala and -lm in linker options for Darwin. 2010-06-18 Robert Dewar <dewar@adacore.com> * gnat1drv.adb (Adjust_Global_Switches): Set Use_Expression_With_Actions true for gcc. 2010-06-18 Robert Dewar <dewar@adacore.com> * sprint.adb: Minor format change for N_Expression_With_Actions. * repinfo.adb: Minor reformatting. 2010-06-18 Ed Schonberg <schonberg@adacore.com> * sem_elim.adb (Check_Eliminated): If within a subunit, use Defining_Entity to obtain the name of the entity in the proper body, to properly handle both separate packages and subprograms. 2010-06-18 Emmanuel Briot <briot@adacore.com> * prj-nmsc.adb (Check_File): New parameter Display_Path. From-SVN: r160976
Diffstat (limited to 'gcc/ada/sem_elim.adb')
-rw-r--r--gcc/ada/sem_elim.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/sem_elim.adb b/gcc/ada/sem_elim.adb
index b7d9348..bb42159 100644
--- a/gcc/ada/sem_elim.adb
+++ b/gcc/ada/sem_elim.adb
@@ -299,7 +299,7 @@ package body Sem_Elim is
-- parsed as a child unit, but the current compilation unit is in
-- fact the parent in which the subunit is embedded. We must skip
-- the first name which is that of the subunit to match the pragma
- -- specification.
+ -- specification. Body may be that of a package or subprogram.
declare
Par : Node_Id;
@@ -308,7 +308,7 @@ package body Sem_Elim is
Par := Parent (E);
while Present (Par) loop
if Nkind (Par) = N_Subunit then
- if Chars (Defining_Unit_Name (Proper_Body (Par))) =
+ if Chars (Defining_Entity (Proper_Body (Par))) =
Elmt.Unit_Name (Up)
then
Up := Up - 1;