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/] [specs/] [oversize.ads] - Blame information for rev 399

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

Line No. Rev Author Line
1 304 jeremybenn
with Ada.Numerics.Discrete_Random;
2
 
3
package Oversize is
4
 
5
   subtype M1 is Integer range 1 .. 200;                    -- Won't trigger
6
   type R1 (D : M1 := 100) is record
7
      Name : String (1 .. D);
8
   end record;
9
 
10
   type M2 is new Integer range 1 .. 200;                   -- Won't trigger
11
   for M2'Size use 64;
12
   type M2S is array (M2 range <>) of Character;
13
   type R2 (D : M2 := 100) is record
14
      Name : M2S (1 .. D);
15
   end record;
16
 
17
   subtype M3 is Integer;                                   -- Will trigger
18
   type R3 (D : M3 := 100) -- { dg-error "may raise Storage_Error" }
19
   is record
20
      Name : String (1 .. D);
21
   end record;
22
 
23
   type M4 is new Positive;                                 -- Will trigger
24
   type M4S is array (M4 range <>) of Character;
25
   type R4 (D : M4 := 100) -- { dg-error "may raise Storage_Error" }
26
   is record
27
      Name : M4S (1 .. D);
28
   end record;
29
 
30
   type M5 is new Positive;                                 -- Will trigger
31
   for M5'Size use Integer'Size - 1;
32
   type M5S is array (M5 range <>) of Character;
33
   type R5 (D : M5 := 100) -- { dg-error "may raise Storage_Error" }
34
   is record
35
      Name : M5S (1 .. D);
36
   end record;
37
 
38
   subtype M6 is Integer range 1 .. (Integer'Last + 1)/2;   -- Won't trigger
39
   type R6 (D : M6 := 100) is record
40
      Name : String (1 .. D);
41
   end record;
42
 
43
   subtype M7 is Integer range 1 .. (Integer'Last + 1)/2+1; -- Will trigger
44
   type R7 (D : M7 := 100) -- { dg-error "may raise Storage_Error" }
45
   is record
46
      Name : String (1 .. D);
47
   end record;
48
 
49
   package P8 is new Ada.Numerics.Discrete_Random (Natural);
50
   G8 : P8.Generator;
51
   subtype M8 is Integer range 1 .. P8.Random (G8);         -- Won't trigger
52
   type R8 (D : M8 := 100) is record
53
      Name : String (1 .. D);
54
   end record;
55
 
56
end Oversize;

powered by: WebSVN 2.1.0

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