OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gnat.dg/] [frame_overflow.adb] - Blame information for rev 645

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

Line No. Rev Author Line
1 149 jeremybenn
-- { dg-do compile }
2
 
3
procedure frame_overflow is
4
 
5
   type Bitpos_Range_T is new Positive;
6
   type Bitmap_Array_T is array (Bitpos_Range_T) of Boolean;
7
 
8
   type Bitmap_T is record
9
      Bits : Bitmap_Array_T := (others => False);
10
   end record;
11
 
12
   function -- { dg-error "too large" "" }
13
     Set_In (Bitmap : Bitmap_T; Bitpos : Bitpos_Range_T)  return Bitmap_T
14
   is
15
      Result: Bitmap_T := Bitmap;
16
   begin
17
      Result.Bits (Bitpos) := True;
18
      return Result;
19
   end;
20
 
21
   function -- { dg-error "too large" "" }
22
     Negate (Bitmap : Bitmap_T) return Bitmap_T is
23
      Result: Bitmap_T;
24
   begin
25
      for E in Bitpos_Range_T loop
26
        Result.Bits (E) := not Bitmap.Bits (E);
27
      end loop;
28
      return Result;
29
  end;
30
 
31
begin
32
   null;
33
end;

powered by: WebSVN 2.1.0

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