Logo
Explore Mirrors Help
Sign In
6502/llvm-6502
1
0
Fork 0
You've already forked llvm-6502
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-01-12 02:33:33 +00:00
Code Issues Projects Releases Wiki Activity
llvm-6502/test/FrontendAda/negative_field_offset.adb

17 lines
361 B
Ada
Raw Normal View History

Test handling of record fields with negative offsets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84851 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22 10:02:10 +00:00
-- 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;
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
2009-10-22 12:53:25 +00:00
procedure Q (P : String_Pointer) is
begin
P (1) := 'Z';
end;
Test handling of record fields with negative offsets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84851 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22 10:02:10 +00:00
begin
P := new String (1 .. N);
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
2009-10-22 12:53:25 +00:00
Q (P);
Test handling of record fields with negative offsets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84851 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22 10:02:10 +00:00
end;
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.1 Page: 2170ms Template: 5ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API