OSDN Git Service

* gnat.dg/bit_packed_array5.ads: Move dg directive to...
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gnat.dg / unchecked_convert5b.adb
1 -- { dg-do run { target i?86-*-* x86_64-*-* alpha*-*-* ia64-*-* } }
2
3 with Unchecked_Conversion;
4
5 procedure Unchecked_Convert5b is
6
7   subtype c_1 is string(1..1);
8
9   function int2c1 is  -- { dg-warning "different sizes" }
10     new unchecked_conversion (source => integer, target => c_1);
11
12   c1 : c_1;
13
14 begin
15
16   c1 := int2c1(16#12#);
17
18   if c1 (1) /= ASCII.DC2 then
19     raise Program_Error;
20   end if;
21
22 end;