diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-09 17:16:22 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-09 17:16:22 +0000 |
commit | 136d479bb4214ff4edeb12e64ccb6bd6bb79a894 (patch) | |
tree | 3d8042f676028733216495b35bc6bac0d717a751 /gcc/ada/a-coinve.adb | |
parent | 2ec38781061e5b5a86351d133c1badf125b1ef21 (diff) | |
download | gcc-136d479bb4214ff4edeb12e64ccb6bd6bb79a894.tar.gz |
2005-12-05 Matthew Heaney <heaney@adacore.com>
* a-convec.adb (Merge): Added assertions to check whether vector params
are sorted.
* a-coinve.adb (Merge): Added assertions to check whether vector params
are sorted.
* a-cohama.ads (Cursor'Write): raises Program_Error per latest AI-302
draft.
(Cursor'Read): raises PE
* a-cohama.adb (Insert.New_Node): Uses box-style syntax to init elem
to its default value.
* a-cihama.adb: Manually check whether cursor's key and elem are
non-null
* a-cidlli.ads, a-cidlli.adb (Splice): Changed param name and param mode
(Merge): Assert that target and source lists are in order
(Swap): Declare non-const temporaries, to pass to Splice
* a-cdlili.ads: (Splice): Changed param name and param mode
* a-cdlili.adb: (Splice): Changed param name and param mode
(Merge): Assert that target and source lists are in order
(Swap): Declare non-const temporaries, to pass to Splice
* a-ciorma.ads, a-coorma.ads: (Read): declare Stream param as not null
(Write): declare Stream param as not null
* a-ciorma.adb, a-coorma.adb: All explicit raise statements now include
an exception message.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108287 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-coinve.adb')
-rw-r--r-- | gcc/ada/a-coinve.adb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/a-coinve.adb b/gcc/ada/a-coinve.adb index b3c7cd8e910..6aee444e1b0 100644 --- a/gcc/ada/a-coinve.adb +++ b/gcc/ada/a-coinve.adb @@ -895,6 +895,12 @@ package body Ada.Containers.Indefinite_Vectors is J := Target.Last; while Source.Last >= Index_Type'First loop + pragma Assert + (Source.Last <= Index_Type'First + or else not (Is_Less + (Source.Elements (Source.Last), + Source.Elements (Source.Last - 1)))); + if I < Index_Type'First then declare Src : Elements_Type renames @@ -909,6 +915,12 @@ package body Ada.Containers.Indefinite_Vectors is return; end if; + pragma Assert + (I <= Index_Type'First + or else not (Is_Less + (Target.Elements (I), + Target.Elements (I - 1)))); + declare Src : Element_Access renames Source.Elements (Source.Last); Tgt : Element_Access renames Target.Elements (I); |