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/] [assert1.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
pragma Assertion_Policy (Check);
5
with Text_IO; use Text_IO;
6
procedure assert1 is
7
   type p1 is array (1 .. 113) of Boolean;
8
   pragma Pack (p1);
9
   type p2 is array (1 .. 13) of Boolean;
10
   pragma Pack (p2);
11
   type p3 is array (1 .. 113) of Boolean;
12
   pragma Pack (p3);
13
   for p3'size use 113;
14
   type p4 is array (1 .. 13) of Boolean;
15
   pragma Pack (p4);
16
   for p4'size use 13;
17
   v1 : p1;
18
   v2 : p2;
19
   v3 : p3;
20
   v4 : p4;
21
begin
22
   pragma Assert (p1'Size = 120);
23
   pragma Assert (p2'Size = 13);
24
   pragma Assert (p3'Size = 113);
25
   pragma Assert (p4'Size = 13);
26
   pragma Assert (p1'Value_Size = 120);
27
   pragma Assert (p2'Value_Size = 13);
28
   pragma Assert (p3'Value_Size = 113);
29
   pragma Assert (p4'Value_Size = 13);
30
   pragma Assert (p1'Object_Size = 120);
31
   pragma Assert (p2'Object_Size = 16);
32
   pragma Assert (p3'Object_Size = 120);
33
   pragma Assert (p4'Object_Size = 16);
34
   pragma Assert (v1'Size = 120);
35
   pragma Assert (v2'Size = 16);
36
   pragma Assert (v3'Size = 120);
37
   pragma Assert (v4'Size = 16);
38
   null;
39
end;

powered by: WebSVN 2.1.0

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