OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gnat.dg/] [test_rational_arithmetic.adb] - Diff between revs 304 and 338

Only display areas with differences | Details | Blame | View Log

Rev 304 Rev 338
-- { dg-do compile }
-- { dg-do compile }
 
 
with Rational_Arithmetic;
with Rational_Arithmetic;
use  Rational_Arithmetic;
use  Rational_Arithmetic;
procedure Test_Rational_Arithmetic is
procedure Test_Rational_Arithmetic is
  R: Rational := 10/2;
  R: Rational := 10/2;
  B: Boolean  := R = 5/1;  -- RHS cannot be a Whole
  B: Boolean  := R = 5/1;  -- RHS cannot be a Whole
                           -- ("/" has been "undefined")
                           -- ("/" has been "undefined")
  C: Boolean  := R = Rational' (5/1);
  C: Boolean  := R = Rational' (5/1);
  D: Boolean  := (6/3) = R;
  D: Boolean  := (6/3) = R;
  E: Boolean  := (2/1 = 4/2);
  E: Boolean  := (2/1 = 4/2);
begin
begin
  R := 1+1/(4/8);
  R := 1+1/(4/8);
  R := 2*(3/2)-(7/3)*3;
  R := 2*(3/2)-(7/3)*3;
end Test_Rational_Arithmetic;
end Test_Rational_Arithmetic;
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.