gcc/testsuite/gnat.dg/unchecked_convert9.ads
raw| 1 | with System; |
| 2 | with Ada.Unchecked_Conversion; |
| 3 | with Interfaces; use Interfaces; |
| 4 | |
| 5 | package Unchecked_Convert9 is |
| 6 | |
| 7 | type R is record |
| 8 | H : Unsigned_16; |
| 9 | L : Unsigned_16; |
| 10 | end record; |
| 11 | |
| 12 | Var : R; |
| 13 | pragma Volatile (Var); |
| 14 | |
| 15 | function Conv is new |
| 16 | Ada.Unchecked_Conversion (Source => Unsigned_32, Target => R); |
| 17 | |
| 18 | procedure Proc; |
| 19 | |
| 20 | end Unchecked_Convert9; |