diff options
author | Robert Dewar <dewar@adacore.com> | 2007-08-14 10:41:26 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-08-14 10:41:26 +0200 |
commit | dc0961329fdc886ce02cda642873705e76b2ccaa (patch) | |
tree | 58e67ec02c18367eec20cf7cd4efe2621e4befce /gcc | |
parent | 1b6c95c49fdf70bbeed275351896b734bb80950f (diff) | |
download | gcc-dc0961329fdc886ce02cda642873705e76b2ccaa.zip gcc-dc0961329fdc886ce02cda642873705e76b2ccaa.tar.gz gcc-dc0961329fdc886ce02cda642873705e76b2ccaa.tar.bz2 |
sem_elim.adb (Set_Eliminated): Ignore pragma Eliminate for dispatching operation
2007-08-14 Robert Dewar <dewar@adacore.com>
* sem_elim.adb (Set_Eliminated): Ignore pragma Eliminate for
dispatching operation
From-SVN: r127428
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_elim.adb | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gcc/ada/sem_elim.adb b/gcc/ada/sem_elim.adb index f7b8c1a..13b2fc6 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; |