OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gnat.dg/] [unchecked_convert6b.adb] - Blame information for rev 696

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 696 jeremybenn
-- { dg-do run { target i?86-*-* x86_64-*-* alpha*-*-* ia64-*-* } }
2
 
3
with Unchecked_Conversion;
4
 
5
procedure Unchecked_Convert6b 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
 
14
begin
15
 
16
  c5 := int2c5(16#12#);
17
 
18
  if c5 (1) /= ASCII.DC2 then
19
    raise Program_Error;
20
  end if;
21
 
22
end;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.