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/] [alignment9.adb] - 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 run }
2
-- { dg-options "-gnatws" }
3
 
4
procedure Alignment9 is
5
 
6
  type Kind is (Small, Large);
7
  for Kind'Size use 8;
8
 
9
  type Header is
10
    record
11
      K : Kind;
12
      I : Integer;
13
    end record;
14
 
15
  for Header use
16
    record
17
      K at 4 range 0..7;
18
      I at 0 range 0..31;
19
    end record;
20
 
21
  for Header'Size use 5*8;
22
  for Header'Alignment use 1;
23
 
24
  H : Header;
25
 
26
begin
27
  if H'Size /= 40 then
28
    raise Program_Error;
29
  end if;
30
end;

powered by: WebSVN 2.1.0

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