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
analyzer: Fix PR analyzer/101980
[official-gcc.git]
/
gcc
/
testsuite
/
gnat.dg
/
slice10.adb
blob
4793258003d4c0ca2647336e72f72f9f84cef7df
1
-- { dg-do run }
2
3
procedure
Slice10
is
4
5
subtype
Str
is
String
(
1
..
3
);
6
7
type
T
is record
8
B
:
Boolean
;
9
S
:
Str
;
10
end record
;
11
12
for
T
use record
13
B
at
0
range
0
..
0
;
14
S
at
0
range
1
..
24
;
15
end record
;
16
17
function
Match
(
X
,
Y
:
T
;
Length
:
Positive
)
return
Boolean
is
18
begin
19
return
X
.
S
(
1
..
Length
) =
Y
.
S
(
1
..
Length
);
20
end
;
21
22
X
,
Y
:
T
:= (
B
=>
True
,
S
=>
"123"
);
23
24
begin
25
X
.
B
:=
False
;
26
if not
match
(
X
,
Y
,
3
)
then
27
raise
Program_Error
;
28
end if
;
29
end
;