From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19727 invoked by alias); 13 Oct 2006 17:43:24 -0000 Received: (qmail 19701 invoked by uid 48); 13 Oct 2006 17:43:12 -0000 Date: Fri, 13 Oct 2006 17:43:00 -0000 Subject: [Bug ada/29462] New: Sign ignored on fixed point multiplication X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dewi dot daniels at silver-software dot com" 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 X-SW-Source: 2006-10/txt/msg01153.txt.bz2 List-Id: The sign seems to be ignored when multiplying a named number with a fixed point value. Converting the named number to a fixed point type seems to work around the problem. See the example below: with Ada.Text_IO; procedure Test is type T is delta 0.1 range -1.0 .. 1.0; X : constant := -1.0; Y : T; package T_IO is new Ada.Text_IO.Fixed_IO (T); begin Ada.Text_IO.Put ("X = "); T_IO.Put (X); Ada.Text_IO.New_Line; Y := -1.0; Ada.Text_IO.Put ("Y = "); T_IO.Put (Y); Ada.Text_IO.New_Line; Ada.Text_IO.Put ("X * Y = "); T_IO.Put (X * Y); Ada.Text_IO.New_Line; Ada.Text_IO.Put ("T (X) * Y = "); T_IO.Put (T (X) * Y); Ada.Text_IO.New_Line; end Test; -- Summary: Sign ignored on fixed point multiplication Product: gcc Version: 3.4.5 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dewi dot daniels at silver-software dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29462