summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_disp.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-15 09:37:59 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-15 09:37:59 +0000
commit555c63a669bf0ad0343938c048251c4cb11d7b80 (patch)
tree38bc90b9dd8f35bf9fd91bf6f030403ca57a17c9 /gcc/ada/sem_disp.adb
parentbf8f98953b25cef452694bff49e4bb8d0a5b7007 (diff)
downloadgcc-555c63a669bf0ad0343938c048251c4cb11d7b80.tar.gz
2009-04-15 Robert Dewar <dewar@adacore.com>
* sem_prag.adb: Minor reformatting. * sem_type.adb: Minor reformatting 2009-04-15 Javier Miranda <miranda@adacore.com> * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Add missing support to check eliminated subprograms. * sem_elim.ads (Eliminate_Error_Msg): Update documentation. * sem_elim.adb (Set_Eliminated): Add support for elimination of dispatching subprograms. * exp_disp.adb (Make_DT): Minor code cleanup when freezing primitive operations. Initialize with "null" the slots of eliminated dispaching primitives. (Write_DT): Add output for eliminated primitives. * sem_disp.adb (Check_Dispatching_Call): Check eliminated primitives. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146093 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_disp.adb')
-rw-r--r--gcc/ada/sem_disp.adb5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb
index a1faa3f4152..96e6bc1fb34 100644
--- a/gcc/ada/sem_disp.adb
+++ b/gcc/ada/sem_disp.adb
@@ -42,6 +42,7 @@ with Rident; use Rident;
with Sem; use Sem;
with Sem_Aux; use Sem_Aux;
with Sem_Ch6; use Sem_Ch6;
+with Sem_Elim; use Sem_Elim;
with Sem_Eval; use Sem_Eval;
with Sem_Type; use Sem_Type;
with Sem_Util; use Sem_Util;
@@ -483,6 +484,10 @@ package body Sem_Disp is
Set_Controlling_Argument (N, Control);
Check_Restriction (No_Dispatching_Calls, N);
+ if Is_Eliminated (Ultimate_Alias (Subp_Entity)) then
+ Eliminate_Error_Msg (N, Ultimate_Alias (Subp_Entity));
+ end if;
+
-- If there is a statically tagged actual and a tag-indeterminate
-- call to a function of the ancestor (such as that provided by a
-- default), then treat this as a dispatching call and propagate