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.0rc2/] [gcc/] [testsuite/] [gnat.dg/] [named_test.adb] - Rev 304
Go to most recent revision | Compare with Previous | Blame | View Log
-- { dg-do run } with Text_IO; use Text_IO; procedure Named_Test is type Base is tagged limited record Flag : boolean; Value : integer; end record; -- function Build (X : Integer; Y : Integer) return Base is begin return Result : Base do Result.Flag := (X = Y); Result.Value := X * Y; end return; end; -- type Table is array (1..1) of Base; It : Table := (1 => Build ( Y => 17, X => 11)); begin if It (1).Flag or else It (1).Value /= 187 then raise Program_Error; end if; end;
Go to most recent revision | Compare with Previous | Blame | View Log