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/] [unc.adb] - Blame information for rev 328

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 jeremybenn
-- { dg-do compile }
2
 
3
with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO;
4
procedure Unc is
5
   type Arr is array (1..4) of integer;
6
   type Bytes is array (positive range <>) of Character;
7
   type Buffer (D : Boolean := False) is record
8
      case D is
9
        when False =>
10
           Chars: Bytes (1..16);
11
        when True =>
12
           Values : Arr;
13
      end case;
14
   end record;
15
--
16
   pragma Unchecked_Union (Buffer);
17
   pragma Warnings (Off);
18
   Val : Buffer;
19
--      
20
   F : File_Type;
21
   S : Stream_Access;
22
begin
23
   Create (F, Out_File);
24
   S := Stream (F);
25
   Buffer'Output (S, Val);
26
end;

powered by: WebSVN 2.1.0

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