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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gnat.dg/] [test_bip_no_alloc.adb] - Blame information for rev 378

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

Line No. Rev Author Line
1 304 jeremybenn
--  { dg-do compile }
2
 
3
pragma Restrictions (No_Allocators);
4
procedure Test_BIP_No_Alloc is
5
 
6
   type LR (B : Boolean) is limited record
7
      X : Integer;
8
   end record;
9
 
10
   function FLR return LR is
11
   begin
12
      --  A return statement in a function with a limited and unconstrained
13
      --  result subtype can result in expansion of an allocator for the
14
      --  secondary stack, but that should not result in a violation of the
15
      --  restriction No_Allocators.
16
 
17
      return (B => False, X => 123);
18
   end FLR;
19
 
20
   Obj : LR := FLR;
21
 
22
begin
23
   null;
24
end Test_BIP_No_Alloc;

powered by: WebSVN 2.1.0

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