repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2016-11-21 Thomas Preud'homme <thomas.preudhomme@arm.com>
[official-gcc.git]
/
gcc
/
testsuite
/
gnat.dg
/
pack3.adb
blob
06f71cbe91d1069ca89c1f5da2b097fb6ed2291f
1
-- { dg-do run }
2
3
procedure
Pack3
is
4
5
type
U32
is mod
2
**
32
;
6
7
type
Key
is record
8
Value
:
U32
;
9
Valid
:
Boolean
;
10
end record
;
11
12
type
Key_Buffer
is record
13
Current
,
Latch
:
Key
;
14
end record
;
15
16
type
Block
is record
17
Keys
:
Key_Buffer
;
18
Stamp
:
U32
;
19
end record
;
20
pragma
Pack
(
Block
);
21
22
My_Block
:
Block
;
23
My_Stamp
:
constant
:=
16
#
01234567
#
;
24
25
begin
26
My_Block
.
Stamp
:=
My_Stamp
;
27
My_Block
.
Keys
.
Latch
:=
My_Block
.
Keys
.
Current
;
28
if
My_Block
.
Stamp
/=
My_Stamp
then
29
raise
Program_Error
;
30
end if
;
31
end
;