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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gnat.dg/] [entry_queues.adb] - Diff between revs 304 and 338

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 304 Rev 338
-- { dg-do run }
-- { dg-do run }
-- { dg-options "-gnatws" }
-- { dg-options "-gnatws" }
 
 
procedure entry_queues is
procedure entry_queues is
  F1_Poe : Integer := 18;
  F1_Poe : Integer := 18;
  function F1 return Integer is
  function F1 return Integer is
  begin
  begin
    F1_Poe := F1_Poe - 1;
    F1_Poe := F1_Poe - 1;
    return F1_Poe;
    return F1_Poe;
  end F1;
  end F1;
  generic
  generic
    type T is limited private;
    type T is limited private;
    with function Is_Ok (X : T) return Boolean;
    with function Is_Ok (X : T) return Boolean;
  procedure Check;
  procedure Check;
  procedure Check is
  procedure Check is
  begin
  begin
    declare
    declare
      type Poe is new T;
      type Poe is new T;
      X : Poe;
      X : Poe;
      Y : Poe;
      Y : Poe;
    begin
    begin
      null;
      null;
    end;
    end;
    declare
    declare
      type Poe is new T;
      type Poe is new T;
      type Arr is array (1 .. 2) of Poe;
      type Arr is array (1 .. 2) of Poe;
      X : Arr;
      X : Arr;
      B : Boolean := Is_Ok (T (X (1)));
      B : Boolean := Is_Ok (T (X (1)));
    begin
    begin
      null;
      null;
    end;
    end;
  end;
  end;
  protected type Poe (D3 : Integer := F1) is
  protected type Poe (D3 : Integer := F1) is
    entry E (D3 .. F1);    -- F1 evaluated
    entry E (D3 .. F1);    -- F1 evaluated
    function Is_Ok return Boolean;
    function Is_Ok return Boolean;
  end Poe;
  end Poe;
  protected body Poe is
  protected body Poe is
    Entry E (for I in D3 .. F1) when True is
    Entry E (for I in D3 .. F1) when True is
    begin
    begin
      null;
      null;
    end E;
    end E;
    function Is_Ok return Boolean is
    function Is_Ok return Boolean is
    begin
    begin
      return False;
      return False;
    end Is_Ok;
    end Is_Ok;
  end Poe;
  end Poe;
  function Is_Ok (C : Poe) return Boolean is
  function Is_Ok (C : Poe) return Boolean is
  begin
  begin
    return C.Is_Ok;
    return C.Is_Ok;
  end Is_Ok;
  end Is_Ok;
  procedure Chk is new Check (Poe, Is_Ok);
  procedure Chk is new Check (Poe, Is_Ok);
begin
begin
   Chk;
   Chk;
end;
end;
 
 

powered by: WebSVN 2.1.0

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