[llvm-commits] [llvm] r84853 - /llvm/trunk/test/FrontendAda/negative_field_offset.adb
Duncan Sands
baldrick at free.fr
Thu Oct 22 05:53:26 PDT 2009
Author: baldrick
Date: Thu Oct 22 07:53:25 2009
New Revision: 84853
URL: http://llvm.org/viewvc/llvm-project?rev=84853&view=rev
Log:
Check that accessing a struct field that occurs before the start
of the struct (!) works correctly.
Modified:
llvm/trunk/test/FrontendAda/negative_field_offset.adb
Modified: llvm/trunk/test/FrontendAda/negative_field_offset.adb
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/negative_field_offset.adb?rev=84853&r1=84852&r2=84853&view=diff
==============================================================================
--- llvm/trunk/test/FrontendAda/negative_field_offset.adb (original)
+++ llvm/trunk/test/FrontendAda/negative_field_offset.adb Thu Oct 22 07:53:25 2009
@@ -5,6 +5,12 @@
-- 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;
More information about the llvm-commits
mailing list