gcc/testsuite/gnat.dg/opt98.ads
raw| 1 | with Ada.Unchecked_Conversion; |
| 2 | with System; |
| 3 | |
| 4 | package Opt98 is |
| 5 | |
| 6 | type Rec is record |
| 7 | I : Integer; |
| 8 | end record; |
| 9 | |
| 10 | function To_Address is new Ada.Unchecked_Conversion (Rec, System.Address); |
| 11 | |
| 12 | function To_Rec is new Ada.Unchecked_Conversion (System.Address, Rec); |
| 13 | |
| 14 | A : System.Address with Atomic; |
| 15 | |
| 16 | function Func return Rec; |
| 17 | |
| 18 | end Opt98; |
| 19 |