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
2015-05-04 Andrew Sutton <andrew.n.sutton@gmail.com>
[official-gcc.git]
/
gcc
/
testsuite
/
gnat.dg
/
boolean_conv.adb
blob
7a9b4f3e87a291e8db2364caf9a18131f2f0804a
1
-- { dg-do run }
2
3
with
System
;
use
System
;
4
5
procedure
Boolean_Conv
is
6
subtype
B1
is
Boolean
;
7
subtype
B2
is
Boolean
;
8
A0
,
A1
,
A2
:
Address
;
9
10
B
:
aliased
B1
;
11
12
procedure
P2
(
X2
:
access
B2
)
is
13
begin
14
A2
:=
X2
.
all
'Address
;
15
end
P2
;
16
17
procedure
P1
(
X1
:
access
B1
)
is
18
begin
19
A1
:=
X1
.
all
'Address
;
20
P2
(
B2
(
X1
.
all
)
'Unrestricted_Access
);
21
end
P1
;
22
23
begin
24
A0
:=
B
'Address
;
25
P1
(
B
'Access
);
26
27
if
A1
/=
A0
then
28
raise
Program_Error
;
29
end if
;
30
31
if
A2
/=
A0
then
32
raise
Program_Error
;
33
end if
;
34
end
;