gcc/testsuite/gnat.dg/renaming18.adb
raw| 1 | -- { dg-do compile } |
| 2 | -- { dg-options "-gnatwu" } |
| 3 | |
| 4 | procedure Renaming18 is |
| 5 | |
| 6 | type T is record |
| 7 | Item : Integer; |
| 8 | end record; |
| 9 | |
| 10 | A_T : T; |
| 11 | Item : Integer renames A_T.Item; |
| 12 | |
| 13 | type VFA_T is record |
| 14 | Item : Integer; |
| 15 | end record |
| 16 | with Volatile_Full_Access; |
| 17 | |
| 18 | A_VFA_T : VFA_T; |
| 19 | VFA_Item : Integer renames A_VFA_T.Item; -- { dg-bogus "is not referenced" } |
| 20 | |
| 21 | begin |
| 22 | Item := 42; |
| 23 | VFA_Item := 42; |
| 24 | end; |