gcc/testsuite/gnat.dg/pack11.adb
raw| 1 | -- { dg-do run } |
| 2 | -- { dg-options "-gnatws" } |
| 3 | |
| 4 | with System; |
| 5 | |
| 6 | procedure Pack11 is |
| 7 | |
| 8 | type R1 is record |
| 9 | A1, A2, A3 : System.Address; |
| 10 | end record; |
| 11 | |
| 12 | type R2 is record |
| 13 | C : Character; |
| 14 | R : R1; |
| 15 | end record; |
| 16 | pragma Pack (R2); |
| 17 | |
| 18 | procedure Dummy (R : R1) is begin null; end; |
| 19 | |
| 20 | procedure Init (X : R2) is |
| 21 | begin |
| 22 | Dummy (X.R); |
| 23 | end; |
| 24 | |
| 25 | My_R2 : R2; |
| 26 | |
| 27 | begin |
| 28 | Init (My_R2); |
| 29 | end; |