OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* gnat.dg/bit_packed_array5.ads: Move dg directive to...
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gnat.dg
/
string_slice.adb
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;