I just discovered that the ACATS test cb20004 should be compiled with overflow 
checking, otherwise it can fail when you're tweaking the generated code.

As a matter of fact, it fails with the unmodified compiler if you change the 51

   Initial_Data_Block:
   begin                                    -- Data causes Constraint_Error.
      Data_Buffer.Put (CB20004_0.Data_Item(Report.Ident_Int(51)));

to 35 for example.  The exception is supposed to be raised from:

         if Item > 10 then
            Item_Array (I) := Item * 8;  -- Constraint_Error will be raised

and you need overflow checking to handle all the cases.

Tested on i586-suse-linux, applied on the mainline, 4.6 and 4.5 branches.


2012-01-06  Eric Botcazou  <ebotca...@adacore.com>

        * ada/acats/overflow.lst: Add cb20004.


-- 
Eric Botcazou
Index: ada/acats/overflow.lst
===================================================================
--- ada/acats/overflow.lst	(revision 182780)
+++ ada/acats/overflow.lst	(working copy)
@@ -14,3 +14,4 @@ c46014a
 c460008
 c460011
 c4a012b
+cb20004

Reply via email to