mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-01 16:33:37 +01:00
15030fc8e7
of the struct (!) works correctly. llvm-svn: 84853
17 lines
361 B
Ada
17 lines
361 B
Ada
-- RUN: %llvmgcc -c %s
|
|
with System;
|
|
procedure Negative_Field_Offset (N : Integer) is
|
|
type String_Pointer is access String;
|
|
-- Force use of a thin pointer.
|
|
for String_Pointer'Size use System.Word_Size;
|
|
P : String_Pointer;
|
|
|
|
procedure Q (P : String_Pointer) is
|
|
begin
|
|
P (1) := 'Z';
|
|
end;
|
|
begin
|
|
P := new String (1 .. N);
|
|
Q (P);
|
|
end;
|