public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/23514] New: fixed point error cause Ada exception block does NOT work
@ 2005-08-22 10:49 kuan_long at hotmail dot com
  2005-08-22 12:47 ` [Bug ada/23514] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: kuan_long at hotmail dot com @ 2005-08-22 10:49 UTC (permalink / raw)
  To: gcc-bugs

the bug should be only in windows OS


my test evnironment is win2k and win xp.
they are not work well.
I have try those compiler:
Gnat 3.15 p / mingw 3.42 / mingw 4.1


--the test code is
With Ada.Text_Io;
Procedure Trading Is
   Type Price Is Delta 0.01 Digits 18;
   Type PriceArray Is Array (Positive Range <>) Of price;
   Procedure Avg (Data : In PriceArray) Is
      Avg, Sum : Price'Base := 0.0;
   Begin
      Ada.Text_Io.Put ("average:"   );
      For Index In Data'Range Loop
         Sum := Sum + Data (Index);
      End Loop;
      Avg := Sum / Data'Length;
      Ada.Text_Io.Put (Price'Image (Avg));
      Ada.Text_Io.New_Line;
   Exception
      When Others =>
         Ada.Text_Io.Put_Line ("error here!");
   End;
Begin
   For Index In Reverse 0 .. 9 Loop
      For Step In 1 .. 3 Loop
         Declare
            Mydata : Pricearray (1 .. Index) :=  (Others => 10.0);
         Begin
            Avg (Mydata);
         End;
      End Loop;
   End Loop;
end Trading;
----end the test code

-- 
           Summary: fixed point error cause Ada exception block does NOT
                    work
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kuan_long at hotmail dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23514


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-08-23 18:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-22 10:49 [Bug ada/23514] New: fixed point error cause Ada exception block does NOT work kuan_long at hotmail dot com
2005-08-22 12:47 ` [Bug ada/23514] " pinskia at gcc dot gnu dot org
2005-08-22 20:02 ` laurent at guerby dot net
2005-08-22 20:50 ` listor1 dot rombobeorn at comhem dot se
2005-08-22 20:52 ` laurent at guerby dot net
2005-08-23 11:26 ` charlet at gcc dot gnu dot org
2005-08-23 14:44 ` kuan_long at hotmail dot com
2005-08-23 15:41 ` pinskia at gcc dot gnu dot org
2005-08-23 18:56 ` charlet at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).