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
2009-09-09 Segher Boessenkool <segher@kernel.crashing.org>
[official-gcc.git]
/
gcc
/
testsuite
/
gnat.dg
/
nested_proc2.adb
blob
b5349563a9955fc92154008440b60ffda12d4e69
1
-- { dg-do compile }
2
-- { dg-options "-gnatws" }
3
4
procedure
Nested_Proc2
is
5
6
type
Arr
is array
(
1
.
.2
)
of
Integer
;
7
8
type
Rec
is record
9
Data
:
Arr
;
10
end record
;
11
12
From
:
Rec
;
13
Index
:
Integer
;
14
15
function
F
(
X
:
Arr
)
return
Integer
is
16
begin
17
return
0
;
18
end
;
19
20
procedure
Test
is
21
begin
22
Index
:=
F
(
From
.
Data
);
23
If
Index
/=
0
then
24
raise
Program_Error
;
25
end if
;
26
end
;
27
28
begin
29
Test
;
30
end
;