~ubuntu-branches/ubuntu/jaunty/adacontrol/jaunty

« back to all changes in this revision

Viewing changes to test/t_reduceable_scope.adb

  • Committer: Bazaar Package Importer
  • Author(s): Ludovic Brenta
  • Date: 2008-04-27 15:25:59 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080427152559-qrlic533a1x02flu
Tags: 1.8r8-1

* New upstream version.
* debian/adacontrol.gpr: delete; use upstream's project file instead.
* patches/build.patch: patch upstream's project file to change Object_Dir
  and Exec_Dir.
* Build-depend on asis 2007 and gnat-4.3.
* Add support for mips, mipsel and ppc64.
* Build and provide ptree.
* ptree.1: new.
* adactl.1: update; new options and rules are available.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
with System;
2
1
procedure T_Reduceable_Scope (X : Integer) is
3
2
   Top : Integer;    -- Not movable
4
3
 
5
 
   package Pack1 is  -- Movable to P
 
4
   package Pack1 is  -- Movable to Unused
6
5
      I : Integer;   -- Not movable
7
6
   end Pack1;
 
7
 
8
8
   procedure Unused is    -- Not used
 
9
      use Pack1;          -- Movable to block
9
10
   begin
10
 
      Pack1.I := 1;
 
11
      begin
 
12
         I := 1;
 
13
      end;
11
14
   end Unused;
12
15
   procedure For_Access is
13
16
   begin
15
18
   end For_Access;
16
19
 
17
20
   package Pack2 is  -- Movable to P
18
 
      I : Integer;   -- Not movable because declared in package spec
 
21
      I : Integer;   -- Movable to body
19
22
   end Pack2;
20
23
   package body Pack2 is
21
24
      procedure P is -- Not movable
50
53
      null;
51
54
   end TT2;
52
55
 
53
 
   T2 : TT1;  -- Not movable
 
56
   T2  : TT1;  -- Not movable
 
57
 
 
58
   type Param_T is range 1 .. 10;   -- Not movable
 
59
   procedure Proc (X : Param_T) is  -- Not used
 
60
   begin
 
61
      null;
 
62
   end Proc;
 
63
 
54
64
begin
55
65
 
56
66
For_Loop : for I in 1..10 loop -- Not movable (For_Loop, I)
67
77
   end;
68
78
   declare
69
79
      I, J, K, L : Integer;  -- I movable to Inner1, J, L movable to P, K not movable
 
80
      generic procedure Pg;  -- Movable to Inner1, but not block because generics are no_blocks
 
81
      procedure Pg is begin null; end;
70
82
 
71
83
      procedure P is         -- Not used
72
84
         procedure Inner1 is -- Not used
73
85
         begin
74
86
            I := 1;
75
87
            L := 1;
 
88
            declare
 
89
               procedure Inst is new Pg;
 
90
            begin
 
91
               Inst;
 
92
            end;
76
93
         end Inner1;
77
94
         procedure Inner2 is -- Not movable
78
95
            type Proc_Ptr is access procedure;