Test handling of record fields with negative offsets.
authorDuncan Sands <baldrick@free.fr>
Thu, 22 Oct 2009 10:02:10 +0000 (10:02 +0000)
committerDuncan Sands <baldrick@free.fr>
Thu, 22 Oct 2009 10:02:10 +0000 (10:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84851 91177308-0d34-0410-b5e6-96231b3b80d8

test/FrontendAda/negative_field_offset.adb [new file with mode: 0644]

diff --git a/test/FrontendAda/negative_field_offset.adb b/test/FrontendAda/negative_field_offset.adb
new file mode 100644 (file)
index 0000000..02e3dac
--- /dev/null
@@ -0,0 +1,10 @@
+-- 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;
+begin
+   P := new String (1 .. N);
+end;