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
* snames.ads-tmpl (Name_Ivdep): New pragma-related name.
[official-gcc.git]
/
gcc
/
testsuite
/
gnat.dg
/
string_slice.adb
blob
c14ae49b7b7d9a02789004f981deaa05ec827f88
1
-- { dg-do run }
2
-- { dg-options "-O" }
3
4
procedure
string_slice
is
5
6
subtype
Key_T
is
String
(
1
..
3
);
7
8
function
One_Xkey
return
Key_T
is
9
Key
:
Key_T
:=
"XXX"
;
10
begin
11
Key
(
1
..
2
) :=
"__"
;
12
return
Key
;
13
end
;
14
15
Key
:
Key_T
:=
One_Xkey
;
16
17
begin
18
if
Key
(
3
) /=
'X'
then
19
raise
Program_Error
;
20
end if
;
21
end
;