aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2013-01-29 15:33:47 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2013-01-29 15:33:47 +0100
commit7e8561128dd304306cdf703d76c6cf59a7e753e7 (patch)
treedecd418f191225b68d8e6f42529425183bc85eee /gcc/ada/sem_util.adb
parent4e3da85af1403ed3599404bd154c1afc0d3e4b13 (diff)
downloadgcc-7e8561128dd304306cdf703d76c6cf59a7e753e7.zip
gcc-7e8561128dd304306cdf703d76c6cf59a7e753e7.tar.gz
gcc-7e8561128dd304306cdf703d76c6cf59a7e753e7.tar.bz2
[multiple changes]
2013-01-29 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Preserve loop identifier only if it comes from source. (Expand_N_Loop_Statement): If the domain of iteration is an enumeration type with a representation clause, remove from visibility the loop identifier before rewriting the loop as a block with a declaration for said identifier. * sem_util.adb (Remove_Homonym): Handle properly the default case. 2013-01-29 Vincent Celier <celier@adacore.com> * prj-proc.adb: Minor comment spelling fix. From-SVN: r195546
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r--gcc/ada/sem_util.adb7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 0fc2365..336ce67 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -12638,6 +12638,7 @@ package body Sem_Util is
else
Set_Name_Entity_Id (Chars (E), Empty);
end if;
+
else
H := Current_Entity (E);
while Present (H) and then H /= E loop
@@ -12645,7 +12646,11 @@ package body Sem_Util is
H := Homonym (H);
end loop;
- Set_Homonym (Prev, Homonym (E));
+ -- If E is not on the homonym chain, nothing to do
+
+ if Present (H) then
+ Set_Homonym (Prev, Homonym (E));
+ end if;
end if;
end Remove_Homonym;