1-- { dg-do run { target hppa*-*-* sparc*-*-* powerpc-*-* powerpc64-*-* } }
2
3with Unchecked_Conversion;
4
5procedure Unchecked_Convert6 is
6
7  subtype c_5 is string(1..5);
8
9  function int2c5 is  -- { dg-warning "different sizes" }
10    new unchecked_conversion (source => integer, target => c_5);
11
12  c5 : c_5;
13
14begin
15
16  c5 := int2c5(16#12#);
17
18  if c5 (4) /= ASCII.DC2 then
19    raise Program_Error;
20  end if;
21
22end;
23