repo.or.cz
/
llvm
/
zpu.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fixed some bugs.
[llvm/zpu.git]
/
test
/
FrontendAda
/
negative_field_offset.adb
blob
f8b85108504dbe7530f6405aa0ffa04c925196c6
1
-- RUN: %llvmgcc -c %s
2
with
System
;
3
procedure
Negative_Field_Offset
(
N
:
Integer
)
is
4
type
String_Pointer
is access
String
;
5
-- Force use of a thin pointer.
6
for
String_Pointer
'Size
use
System
.
Word_Size
;
7
P
:
String_Pointer
;
8
9
procedure
Q
(
P
:
String_Pointer
)
is
10
begin
11
P
(
1
) :=
'Z'
;
12
end
;
13
begin
14
P
:=
new
String
(
1
..
N
);
15
Q
(
P
);
16
end
;