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
Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git]
/
gcc
/
testsuite
/
gnat.dg
/
aliased2.adb
blob
0e1adacd8981e617407ce777826698a4484468b5
1
-- { dg-do run }
2
3
procedure
Aliased2
is
4
5
type
Rec
is record
6
Data
:
access constant
String
;
7
end record
;
8
9
function
Get
(
S
:
aliased
String
)
return
Rec
is
10
R
:
Rec
:= (
Data
=>
S
'Unchecked_Access
);
11
begin
12
return
R
;
13
end
;
14
15
S
:
aliased
String
:=
"Hello"
;
16
17
R
:
Rec
:=
Get
(
S
);
18
19
begin
20
if
R
.
Data
'Length
/=
S
'Length
then
21
raise
Program_Error
;
22
end if
;
23
end
;