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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gnat.dg/] [abstract1.adb] - Blame information for rev 304

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 jeremybenn
--  { dg-do compile }
2
with Ada.Tags.Generic_Dispatching_Constructor;  use Ada.Tags;
3
package body abstract1 is
4
 
5
   function New_T (Stream : not null access Root_Stream_Type'Class)
6
      return T'Class is
7
      function Construct is
8
         new Generic_Dispatching_Constructor (T, Root_Stream_Type'Class, Input);
9
      E : constant String := String'Input (Stream);
10
      I : constant Tag := Internal_Tag (E);
11
 
12
   begin
13
      return Construct (I, Stream);
14
   end New_T;
15
 
16
   function Input (Stream : not null access Root_Stream_Type'Class)
17
     return IT is
18
   begin
19
      return O : IT do
20
        Integer'Read (Stream, O.I);
21
      end return;
22
   end Input;
23
 
24
   function Input (Stream : not null access Root_Stream_Type'Class)
25
      return FT is
26
   begin
27
      return O : FT do
28
        Float'Read (Stream, O.F);
29
      end return;
30
   end Input;
31
end abstract1;

powered by: WebSVN 2.1.0

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