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
Fix broken MinGW build of gcc.c
[official-gcc.git]
/
gcc
/
testsuite
/
gnat.dg
/
pack4.adb
blob
2c73e1dd4ea3b6cf4c01df42cbaeb9ae11bf06a0
1
-- { dg-do run }
2
3
procedure
Pack4
is
4
5
type
Time_T
is record
6
Hour
:
Integer
;
7
end record
;
8
9
type
Date_And_Time_T
is record
10
Date
:
Integer
;
11
Time
:
Time_T
;
12
end record
;
13
14
pragma
Pack
(
Date_And_Time_T
);
15
16
procedure
17
Assign_Hour_Of
(
T
:
out
Time_T
)
18
is
19
begin
20
T
.
Hour
:=
44
;
21
end
;
22
23
procedure
24
Clobber_Hour_Of
(
DT
:
out
Date_And_Time_T
)
25
is
26
begin
27
Assign_Hour_Of
(
Dt
.
Time
);
28
end
;
29
30
DT
:
Date_And_Time_T
;
31
32
begin
33
DT
.
Time
.
Hour
:=
22
;
34
Clobber_Hour_Of
(
DT
);
35
if
DT
.
Time
.
Hour
/=
44
then
36
raise
Program_Error
;
37
end if
;
38
end
;