gcc/testsuite/gnat.dg/addr15.adb
raw| 1 | -- { dg-do run } |
| 2 | |
| 3 | with System; use System; |
| 4 | |
| 5 | procedure Addr15 is |
| 6 | |
| 7 | function Get_Bound (Param : Integer) return Integer is (Param); |
| 8 | |
| 9 | type Alpha_Typ is array (1 .. Get_Bound (1)) of Integer; |
| 10 | type Beta_Typ is array (1 .. Get_Bound (0)) of Integer; |
| 11 | |
| 12 | Alpha : Alpha_Typ; |
| 13 | Beta : aliased Beta_Typ; |
| 14 | |
| 15 | begin |
| 16 | if Alpha'Address = Beta'Address then |
| 17 | raise Program_Error; |
| 18 | end if; |
| 19 | end; |