summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/warn2.adb
blob: 8675a524f29edaf57ba88b3e4ed5b7b3d7933774 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--  { dg-do compile }

with Unchecked_Conversion;
procedure warn2 is
   type R1 is record X : Integer; end record;
   type R2 is record X, Y : Integer; end record;
   pragma Warnings
     (Off, "types for unchecked conversion have different sizes");
   function F is new Unchecked_Conversion (R1, R2);
   pragma Warnings
     (On, "types for unchecked conversion have different sizes");
begin
   null;
end warn2;