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
PR target/84336
[official-gcc.git]
/
gcc
/
testsuite
/
gnat.dg
/
modular3.adb
blob
539edcaf4d4144b642f0a9980d4f9b294435993e
1
-- { dg-do run }
2
3
with
Modular3_Pkg
;
use
Modular3_Pkg
;
4
5
procedure
Modular3
is
6
7
function
F1
(
A
:
Int16_T
)
return
Int16_T
is
8
begin
9
return
A
+
128
;
10
end
;
11
12
function
F2
(
B
:
Mod16_T
)
return
Mod16_T
is
13
begin
14
return
B
+
128
;
15
end
;
16
17
A
:
Int16_T
:=
16384
;
18
B
:
Mod16_T
:=
65504
;
19
20
begin
21
22
A
:=
F1
(
A
);
23
if
A
/=
16512
then
24
raise
Program_Error
;
25
end if
;
26
27
B
:=
F2
(
B
);
28
if
B
/=
96
then
29
raise
Program_Error
;
30
end if
;
31
32
end
Modular3
;