gcc/testsuite/gnat.dg/storage_size1.adb
raw| 1 | -- { dg-do compile } |
| 2 | |
| 3 | with Ada.Text_IO; with Ada.Integer_Text_IO; |
| 4 | |
| 5 | procedure Storage_Size1 is |
| 6 | |
| 7 | package O renames Ada.Text_IO; |
| 8 | package T renames Ada.Integer_Text_IO; |
| 9 | |
| 10 | type Struct is record first, second: Integer; end record; |
| 11 | |
| 12 | type SP is access Struct |
| 13 | with Storage_Size => 64 * Struct'Max_Size_In_Storage_Elements; |
| 14 | |
| 15 | begin |
| 16 | |
| 17 | T.Put(SP'Storage_Size); O.New_Line(1); |
| 18 | |
| 19 | end Storage_Size1; |