OSDN Git Service

* gnat.dg/lto[12456].adb: Add "target lto" marker.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gnat.dg / unchecked_convert4.adb
1 -- { dg-do compile }
2
3 with Unchecked_Conversion;
4
5 procedure Unchecked_Convert4 is
6
7   type Uint32 is mod 2**32;
8
9   type Rec is record
10     I : Uint32;
11   end record;
12   for Rec'Size use 32;
13   pragma Atomic (Rec);
14
15   function Conv is new Unchecked_Conversion (Uint32, Rec);
16
17   function F return Uint32;
18   pragma Import (Ada, F);
19
20   procedure Proc (R : Rec) is begin null; end;
21
22 begin
23   Proc (Conv (F or 1));
24 end;