OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gnat.dg/] [tagged_alloc_free.adb] - Blame information for rev 437

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 jeremybenn
-- { dg-do run }
2
 
3
with Ada.Unchecked_Deallocation;
4
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
5
 
6
procedure Tagged_Alloc_Free is
7
 
8
  type Test_Base is tagged null record;
9
  type Test_Class_Access is access all Test_Base'Class;
10
  type Test_Extension is new Test_Base with record
11
    Last_Name : Unbounded_String := Null_Unbounded_String;
12
  end record;
13
 
14
  procedure Free is new Ada.Unchecked_Deallocation
15
    (Object => Test_Base'Class,
16
     Name   => Test_Class_Access);
17
 
18
  Handle : Test_Class_Access := new Test_Extension;
19
 
20
begin
21
  Free (Handle);
22
end;

powered by: WebSVN 2.1.0

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