aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_eval.adb
diff options
context:
space:
mode:
authorJavier Miranda <miranda@adacore.com>2010-06-22 13:32:54 +0000
committerArnaud Charlet <charlet@adacore.com>2010-06-22 13:32:54 +0000
commit2b14f3259ebca3c074008e5f8704b006eea1a1da (patch)
tree63f5104e221b8cd64fe35833a7207b87a30200e3 /gcc/ada/sem_eval.adb
parentb93beb6e1dffdf4c2ae561291d8dc280859def3f (diff)
2010-06-22 Javier Miranda <miranda@adacore.com>
* sem_prag.adb, sem_util.adb, sem_util.ads, sem_attr.adb, exp_ch6.adb, exp_disp.adb, sem_eval.adb, exp_dist.adb lib-xref.adb: Code cleanup, this patch replaces duplication of code that traverses the chain of aliased primitives by a call to routine Ultimate_Alias that provides this functionality. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@161184 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_eval.adb')
-rw-r--r--gcc/ada/sem_eval.adb5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb
index d2aeae9d13e..84bb34a66f2 100644
--- a/gcc/ada/sem_eval.adb
+++ b/gcc/ada/sem_eval.adb
@@ -1674,10 +1674,7 @@ package body Sem_Eval is
and then Present (Alias (Entity (Name (N))))
and then Is_Enumeration_Type (Base_Type (Typ))
then
- Lit := Alias (Entity (Name (N)));
- while Present (Alias (Lit)) loop
- Lit := Alias (Lit);
- end loop;
+ Lit := Ultimate_Alias (Entity (Name (N)));
if Ekind (Lit) = E_Enumeration_Literal then
if Base_Type (Etype (Lit)) /= Base_Type (Typ) then