Commit | Line | Data |
---|---|---|
88b9d363 | 1 | -- Copyright 2018-2022 Free Software Foundation, Inc. |
3fcded8f JB |
2 | -- |
3 | -- This program is free software; you can redistribute it and/or modify | |
4 | -- it under the terms of the GNU General Public License as published by | |
5 | -- the Free Software Foundation; either version 3 of the License, or | |
6 | -- (at your option) any later version. | |
7 | -- | |
8 | -- This program is distributed in the hope that it will be useful, | |
9 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | -- GNU General Public License for more details. | |
12 | -- | |
13 | -- You should have received a copy of the GNU General Public License | |
14 | -- along with this program. If not, see <http://www.gnu.org/licenses/>. | |
15 | ||
16 | with Pck; use Pck; | |
3b5c4de0 TT |
17 | with System; |
18 | with Unchecked_Conversion; | |
19 | ||
3fcded8f JB |
20 | procedure VsizeLim is |
21 | Small : String := Ident ("1234567890"); | |
22 | Larger : String := Ident ("1234567890|1234567890|1234567890"); | |
3b5c4de0 TT |
23 | |
24 | type String_Ptr is access all String; | |
25 | type Big_String_Ptr is access all String (Positive); | |
26 | ||
27 | function To_Ptr is | |
28 | new Unchecked_Conversion (System.Address, Big_String_Ptr); | |
29 | ||
30 | Name_Str : String_Ptr := new String'(Larger); | |
31 | Name : Big_String_Ptr := To_Ptr (Name_Str.all'Address); | |
32 | ||
3fcded8f JB |
33 | begin |
34 | Do_Nothing (Small'Address); -- STOP | |
35 | Do_Nothing (Larger'Address); | |
3b5c4de0 | 36 | Do_Nothing (Name'Address); |
3fcded8f | 37 | end VsizeLim; |