aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_disp.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-04-15 11:37:59 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-15 11:37:59 +0200
commit361effb15bd3544f2994a22d2d544aae0dceb678 (patch)
tree38bc90b9dd8f35bf9fd91bf6f030403ca57a17c9 /gcc/ada/sem_disp.adb
parent5afaa917dac97e43afb9f2b6a590b30973d85e21 (diff)
downloadgcc-361effb15bd3544f2994a22d2d544aae0dceb678.zip
gcc-361effb15bd3544f2994a22d2d544aae0dceb678.tar.gz
gcc-361effb15bd3544f2994a22d2d544aae0dceb678.tar.bz2
[multiple changes]
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. From-SVN: r146093
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 a1faa3f..96e6bc1 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