Use static inline to do the right thing when built in C99 mode. Of course,
[llvm/stm8.git] / test / FrontendAda / negative_field_offset.adb
blobec8184dde47b4b0fb9282c23ca498123ebc1d40d
1 -- RUN: %llvmgcc -S %s
2 with System;
3 procedure 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;
9 procedure Q (P : String_Pointer) is
10 begin
11 P (1) := 'Z';
12 end;
13 begin
14 P := new String (1 .. N);
15 Q (P);
16 end;