From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14926 invoked by alias); 22 Aug 2005 20:44:31 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 11180 invoked by uid 48); 22 Aug 2005 20:42:04 -0000 Date: Mon, 22 Aug 2005 20:44:00 -0000 Message-ID: <20050822204204.11179.qmail@sourceware.org> From: "laurent at guerby dot net" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050822201829.23519.listor1.rombobeorn@comhem.se> References: <20050822201829.23519.listor1.rombobeorn@comhem.se> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug ada/23519] Dividing fixed point number by zero returns zero. X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg02580.txt.bz2 List-Id: ------- Additional Comments From laurent at guerby dot net 2005-08-22 20:42 ------- Could you try to add before "end g;" the following line: Ada.Text_IO.Put_Line (Boolean'Image (T'Machine_Overflows)); And report wether it prints True or False? On x86 and x86_64-linux it prints True but I do get an exception (without -gnato as of 20050822). >>From the Ada RM A.5.4 Attributes of Fixed Point Types 4 S'Machine_Overflows Yields the value True if overflow and divide-by-zero are detected and reported by raising Constraint_Error for every predefined operation that yields a result of the type T; yields the value False otherwise. The value of this attribute is of the predefined type Boolean. I'm not sure what the compiler is supposed to do when Machine_Overflows is False. Laurent -- What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23519