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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gnat.dg/] [stack_check1.adb] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 jeremybenn
-- { dg-do run }
2
-- { dg-options "-fstack-check" }
3
 
4
-- This test requires architecture- and OS-specific support code for unwinding
5
-- through signal frames (typically located in *-unwind.h) to pass.  Feel free
6
-- to disable it if this code hasn't been implemented yet.
7
 
8
procedure Stack_Check1 is
9
 
10
  type A is Array (1..2048) of Integer;
11
 
12
  procedure Consume_Stack (N : Integer) is
13
    My_A : A; -- 8 KB static
14
  begin
15
    My_A (1) := 0;
16
    if N <= 0 then
17
      return;
18
    end if;
19
    Consume_Stack (N-1);
20
  end;
21
 
22
  Task T;
23
 
24
  Task body T is
25
  begin
26
    begin
27
      Consume_Stack (Integer'Last);
28
      raise Program_Error;
29
    exception
30
      when Storage_Error => null;
31
    end;
32
 
33
    Consume_Stack (128);
34
  end;
35
 
36
begin
37
  null;
38
end;

powered by: WebSVN 2.1.0

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