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/] [task_stack_align.adb] - Diff between revs 304 and 384

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

Rev 304 Rev 384
-- { dg-do run }
-- { dg-do run }
 
 
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Text_IO; use Ada.Text_IO;
with System.Storage_Elements; use System.Storage_Elements;
with System.Storage_Elements; use System.Storage_Elements;
 
 
procedure Task_Stack_Align is
procedure Task_Stack_Align is
 
 
   type Align_Me is record
   type Align_Me is record
      Value : Integer;
      Value : Integer;
   end record;
   end record;
   for Align_Me'Alignment use Standard'Maximum_Alignment;
   for Align_Me'Alignment use Standard'Maximum_Alignment;
 
 
   procedure Check_Local_Alignment_From (Context : String) is
   procedure Check_Local_Alignment_From (Context : String) is
      Object : Align_Me;
      Object : Align_Me;
   begin
   begin
      if To_Integer (Object'Address) mod Object'Alignment /= 0 then
      if To_Integer (Object'Address) mod Object'Alignment /= 0 then
         Put_Line ("alignment check failed in " & Context);
         Put_Line ("alignment check failed in " & Context);
      end if;
      end if;
   end;
   end;
 
 
   task type T;
   task type T;
 
 
   task body T is
   task body T is
   begin
   begin
      Check_Local_Alignment_From ("task T");
      Check_Local_Alignment_From ("task T");
   end;
   end;
 
 
   Tasks : array (1 .. 50) of T;
   Tasks : array (1 .. 50) of T;
begin
begin
   Check_Local_Alignment_From ("environment");
   Check_Local_Alignment_From ("environment");
end;
end;
 
 

powered by: WebSVN 2.1.0

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