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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 696 jeremybenn
-- { dg-do run }
2
 
3
with Ada.Text_IO; use Ada.Text_IO;
4
with System.Storage_Elements; use System.Storage_Elements;
5
 
6
procedure Task_Stack_Align is
7
 
8
   type Align_Me is record
9
      Value : Integer;
10
   end record;
11
   for Align_Me'Alignment use Standard'Maximum_Alignment;
12
 
13
   procedure Check_Local_Alignment_From (Context : String) is
14
      Object : Align_Me;
15
   begin
16
      if To_Integer (Object'Address) mod Object'Alignment /= 0 then
17
         Put_Line ("alignment check failed in " & Context);
18
      end if;
19
   end;
20
 
21
   task type T;
22
 
23
   task body T is
24
   begin
25
      Check_Local_Alignment_From ("task T");
26
   end;
27
 
28
   Tasks : array (1 .. 50) of T;
29
begin
30
   Check_Local_Alignment_From ("environment");
31
end;

powered by: WebSVN 2.1.0

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