OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gnat.dg/] [specs/] [static_initializer3.ads] - Blame information for rev 378

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 Unchecked_Conversion;
4
 
5
package Static_Initializer3 is
6
 
7
  type Byte is range 0 .. 16#FF#;
8
  for Byte'Size use 8;
9
 
10
  type Word is range 0 .. 16#FFFF# ;
11
  for Word'Size use 16;
12
 
13
  type R is record
14
    b1 : Boolean;
15
    b2 : Boolean;
16
  end record;
17
  for R use record
18
    b1 at 0 range 0..3;
19
    b2 at 0 range 4..7;
20
  end record;
21
  for R'Size use 8;
22
 
23
  function Conv is new Unchecked_Conversion (R, Byte);
24
 
25
  C1 : constant Byte := Conv ((true, false));
26
 
27
  C2 : constant Word := Word(C1);
28
 
29
end Static_Initializer3;

powered by: WebSVN 2.1.0

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