blob: ec8184dde47b4b0fb9282c23ca498123ebc1d40d [file] [log] [blame]
Duncan Sands2b5243d2010-11-25 21:21:59 +00001-- RUN: %llvmgcc -S %s
Duncan Sandsec0a98f2009-10-22 10:02:10 +00002with System;
3procedure 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;
Duncan Sands2a536742009-10-22 12:53:25 +00008
9 procedure Q (P : String_Pointer) is
10 begin
11 P (1) := 'Z';
12 end;
Duncan Sandsec0a98f2009-10-22 10:02:10 +000013begin
14 P := new String (1 .. N);
Duncan Sands2a536742009-10-22 12:53:25 +000015 Q (P);
Duncan Sandsec0a98f2009-10-22 10:02:10 +000016end;