[Bug ada/33910] New: gcc Ada doesn't handle address clauses correctly in Ada 83 mode
gcc -c -gnat83 test.adb procedure Test is X : INTEGER; Y : INTEGER; for Y use at X'ADDRESS; begin null; end Test; XD-Ada generates the error message, %ADAC-E-ADRREPNOSYS, (1) No with clause for predefined package SYSTEM applies to this unit [LRM 10.1.1(4), 13.5(3)] Ada 83 LRM 13.5 states that package SYSTEM "must be named by a with clause that applies to the compilation unit in which the address clause occurs". -- Summary: gcc Ada doesn't handle address clauses correctly in Ada 83 mode 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=33910
[Bug ada/33908] New: gcc Ada does not handle fixed point division correctly in Ada 83 mode
gcc -c -gnat83 test.adb procedure Test is type T is delta 0.1 range 0.0 .. 10.0; X : T; begin X := 10.0; X := T (X / 10.0); end Test; XD-Ada rejects the test program with the following error message, %ADAC-E-UNIVFIXUNIVOPND, (1) Multiplication or division for fixed-point type T is not allowed with an operand of type {universal_real} [LRM 4.5.5(10-11)] gcc Ada compiles the test program (in Ada 83 mode) with no errors. I believe XD-Ada to be correct, and gcc Ada to be incorrect, for the following reason. Ada 83 LRM 4.6 states, "An implicit conversion of a convertible universal operand is applied if and only if the innermost complete context (see 8.7) determines a unique (numeric) target type for the implicit conversion, and there is no legal interpretation of this context without this conversion". In this case, there is no unique target type for the implicit conversion, since Ada 83 allowed division between any two fixed point types. -- Summary: gcc Ada does not handle fixed point division correctly in Ada 83 mode 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=33908
[Bug ada/29462] Sign ignored on fixed point multiplication
--- Comment #3 from dewi dot daniels at silver-software dot com 2007-05-02 15:48 --- Subject: RE: Sign ignored on fixed point multiplication Yes, that output looks correct to me :) > -Original Message- > From: charlet at gcc dot gnu dot org > [mailto:[EMAIL PROTECTED] > Sent: 02 May 2007 13:21 > To: [EMAIL PROTECTED] > Subject: [Bug ada/29462] Sign ignored on fixed point multiplication > > > > > --- Comment #2 from charlet at gcc dot gnu dot org > 2007-05-02 13:20 --- I get the following on trunk, which > I assume is the expected output: > > $ ./test > X = -1.0 > Y = -1.0 > X * Y = 1.0 > T (X) * Y = 1.0 > > > -- > > charlet at gcc dot gnu dot org changed: > >What|Removed |Added > -- > -- > Status|NEW |RESOLVED > Resolution||FIXED >Target Milestone|--- |4.3.0 > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29462 > > --- You are receiving this mail because: --- > You reported the bug, or are watching the reporter. > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29462
[Bug ada/29463] New: Value of a static expression of a decimal fixed point type must be a multiple of the smal
gcc Ada does not always check whether the value of a static expression of a decimal fixed point type is a multiple of the small. Aonix ObjectAda rejects the following program with the error message, "test.adb: Error: line 5 col 22 LRM:4.9(36), The value of a static expression of a decimal fixed point type must be a multiple of the small, Continuing" procedure Test is type T is delta 0.1 digits 2; X : constant := 0.01; Y : constant T := X; begin null; end Test; -- Summary: Value of a static expression of a decimal fixed point type must be a multiple of the smal 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=29463
[Bug ada/29462] New: Sign ignored on fixed point multiplication
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
[Bug ada/28305] New: GNAT bug when inlining instance of a generic subprogram
A GNAT bug is detected whenever pragma Inline is applied to an instance of a generic subprogram and front-end inlining is activated (-gnatN). The problem can be worked around by either applying the pragma Inline to the generic subprogram declaration or deactivating front-end inlining. The test case I used is as follows: gcc -c -gnatN test.ads generic type T is private; function A (Value : T) return T; function A (Value : T) return T is begin return Value; end A; with A; pragma Elaborate_All (A); function Test is new A (Integer); pragma Inline (Test); -- Summary: GNAT bug when inlining instance of a generic subprogram 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=28305