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] - Rev 696

Compare with Previous | Blame | View Log

-- { dg-do run { target i?86-*-* x86_64-*-* alpha*-*-* ia64-*-* } }
 
with Unchecked_Conversion;
 
procedure Unchecked_Convert6b is
 
  subtype c_5 is string(1..5);
 
  function int2c5 is  -- { dg-warning "different sizes" }
    new unchecked_conversion (source => integer, target => c_5);
 
  c5 : c_5;
 
begin
 
  c5 := int2c5(16#12#);
 
  if c5 (1) /= ASCII.DC2 then
    raise Program_Error;
  end if;
 
end;
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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