summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_elim.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-14 08:41:26 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-14 08:41:26 +0000
commitcd78c3195aa33581216b9e921e50ff13aa794333 (patch)
tree58e67ec02c18367eec20cf7cd4efe2621e4befce /gcc/ada/sem_elim.adb
parent21f64ad0cf951c04a65f255ffb2b5b23c40992d6 (diff)
downloadgcc-cd78c3195aa33581216b9e921e50ff13aa794333.tar.gz
2007-08-14 Robert Dewar <dewar@adacore.com>
* sem_elim.adb (Set_Eliminated): Ignore pragma Eliminate for dispatching operation git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127428 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_elim.adb')
-rw-r--r--gcc/ada/sem_elim.adb18
1 files changed, 15 insertions, 3 deletions
diff --git a/gcc/ada/sem_elim.adb b/gcc/ada/sem_elim.adb
index f7b8c1addfb..13b2fc68f50 100644
--- a/gcc/ada/sem_elim.adb
+++ b/gcc/ada/sem_elim.adb
@@ -274,10 +274,20 @@ package body Sem_Elim is
procedure Set_Eliminated;
-- Set current subprogram entity as eliminated
+ --------------------
+ -- Set_Eliminated --
+ --------------------
+
procedure Set_Eliminated is
begin
- Set_Is_Eliminated (E);
- Elim_Entities.Append ((Prag => Elmt.Prag, Subp => E));
+ -- Never try to eliminate dispatching operation, since we
+ -- can't properly process the eliminated result. This could
+ -- be fixed, but is not worth it.
+
+ if not Is_Dispatching_Operation (E) then
+ Set_Is_Eliminated (E);
+ Elim_Entities.Append ((Prag => Elmt.Prag, Subp => E));
+ end if;
end Set_Eliminated;
begin
@@ -537,6 +547,7 @@ package body Sem_Elim is
end if;
return True;
+
else
return False;
end if;
@@ -547,9 +558,10 @@ package body Sem_Elim is
-----------------
function Skip_Spaces return Natural is
- Res : Natural := Idx;
+ Res : Natural;
begin
+ Res := Idx;
while Sloc_Trace (Res) = ' ' loop
Res := Res + 1;