aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-10-22 12:53:25 +0000
committerDuncan Sands <baldrick@free.fr>2009-10-22 12:53:25 +0000
commit9772acdb4718191e696148306a9a5e4b81382403 (patch)
treec23b41df9e588937242dd97017fe77f67b6ef0a0 /test
parent65a168cff33acba4136ef47b1d3611daec369a12 (diff)
downloadexternal_llvm-9772acdb4718191e696148306a9a5e4b81382403.zip
external_llvm-9772acdb4718191e696148306a9a5e4b81382403.tar.gz
external_llvm-9772acdb4718191e696148306a9a5e4b81382403.tar.bz2
Check that accessing a struct field that occurs before the start
of the struct (!) works correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84853 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/FrontendAda/negative_field_offset.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/FrontendAda/negative_field_offset.adb b/test/FrontendAda/negative_field_offset.adb
index 02e3dac..f8b8510 100644
--- a/test/FrontendAda/negative_field_offset.adb
+++ b/test/FrontendAda/negative_field_offset.adb
@@ -5,6 +5,12 @@ procedure Negative_Field_Offset (N : Integer) is
-- 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;