~ubuntu-branches/ubuntu/quantal/gdc-4.6/quantal

« back to all changes in this revision

Viewing changes to debian/patches/address-clauses-timed-entry-calls.diff

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2011-10-27 11:02:58 UTC
  • mfrom: (1.2.1) (1.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20111027110258-e78zmtgibszx20wb
Tags: 0.29.1-4.6.2-1
GCC 4.6.2 release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# backport bug fixes about address clauses and timed entry calls
 
2
# taken from gcc-4.7
 
3
#
 
4
# http://gcc.gnu.org/ml/gcc-patches/2011-08/msg02277.html
 
5
# Thanks to Arnaud Charlet
 
6
 
 
7
--- a/src/gcc/ada/exp_ch9.adb
 
8
+++ b/src/gcc/ada/exp_ch9.adb
 
9
@@ -24,6 +24,7 @@
 
10
 ------------------------------------------------------------------------------
 
11
 
 
12
 with Atree;    use Atree;
 
13
+with Atree.Copy_Separate_List;
 
14
 with Checks;   use Checks;
 
15
 with Einfo;    use Einfo;
 
16
 with Elists;   use Elists;
 
17
@@ -10908,6 +10909,11 @@
 
18
    --          end if;
 
19
    --       end if;
 
20
    --    end;
 
21
+   --
 
22
+   --  The triggering statement and the timed statements have not been
 
23
+   --  analyzed yet (see Analyzed_Timed_Entry_Call).  They may contain local
 
24
+   --  declarations, and therefore the copies that are made during expansion
 
25
+   --  must be disjoint, as for any other inlining.
 
26
 
 
27
    procedure Expand_N_Timed_Entry_Call (N : Node_Id) is
 
28
       Loc : constant Source_Ptr := Sloc (N);
 
29
@@ -11199,7 +11205,7 @@
 
30
          --       <timed-statements>
 
31
          --    end if;
 
32
 
 
33
-         N_Stats := New_Copy_List_Tree (E_Stats);
 
34
+         N_Stats := Copy_Separate_List (E_Stats);
 
35
 
 
36
          Prepend_To (N_Stats,
 
37
            Make_If_Statement (Loc,
 
38
@@ -11242,7 +11248,7 @@
 
39
          --    <dispatching-call>;
 
40
          --    <triggering-statements>
 
41
 
 
42
-         Lim_Typ_Stmts := New_Copy_List_Tree (E_Stats);
 
43
+         Lim_Typ_Stmts := Copy_Separate_List (E_Stats);
 
44
          Prepend_To (Lim_Typ_Stmts, New_Copy_Tree (E_Call));
 
45
 
 
46
          --  Generate:
 
47
--- /dev/null
 
48
+++ b/src/gcc/ada/atree-copy_separate_list.adb
 
49
@@ -0,0 +1,15 @@
 
50
+with Nlists;
 
51
+
 
52
+function Atree.Copy_Separate_List (Source : List_Id) return List_Id is
 
53
+   use Atree.Atree_Private_Part.Nodes;
 
54
+   use Nlists;
 
55
+   Result : constant List_Id := New_List;
 
56
+   Nod    : Node_Id;
 
57
+begin
 
58
+   Nod := Nlists.First (Source);
 
59
+   while Present (Nod) loop
 
60
+      Append (Copy_Separate_Tree (Nod), Result);
 
61
+      Next (Nod);
 
62
+   end loop;
 
63
+   return Result;
 
64
+end Atree.Copy_Separate_List;
 
65
--- /dev/null
 
66
+++ b/src/gcc/ada/atree-copy_separate_list.ads
 
67
@@ -0,0 +1 @@
 
68
+function Atree.Copy_Separate_List (Source : List_Id) return List_Id;
 
69
--- a/src/gcc/ada/gcc-interface/Make-lang.in
 
70
+++ b/src/gcc/ada/gcc-interface/Make-lang.in
 
71
@@ -158,6 +158,7 @@
 
72
  ada/exp_ch7.o \
 
73
  ada/exp_ch8.o \
 
74
  ada/exp_ch9.o \
 
75
+ ada/atree-copy_separate_list.o \
 
76
  ada/exp_code.o        \
 
77
  ada/exp_dbug.o        \
 
78
  ada/exp_disp.o        \
 
79
@@ -1371,6 +1372,17 @@
 
80
    ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
 
81
    ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads 
 
82
 
 
83
+ada/atree-copy_separate_list.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
 
84
+   ada/a-uncdea.ads ada/alloc.ads ada/aspects.ads ada/atree.ads \
 
85
+   ada/atree.adb ada/casing.ads ada/debug.ads ada/einfo.ads \
 
86
+   ada/hostparm.ads ada/namet.ads ada/nlists.ads ada/nlists.adb \
 
87
+   ada/opt.ads ada/output.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
 
88
+   ada/snames.ads ada/system.ads ada/s-exctab.ads ada/s-imenne.ads \
 
89
+   ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \
 
90
+   ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
 
91
+   ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
 
92
+   ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads 
 
93
+
 
94
 ada/back_end.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
 
95
    ada/a-uncdea.ads ada/alloc.ads ada/aspects.ads ada/atree.ads \
 
96
    ada/atree.adb ada/back_end.ads ada/back_end.adb ada/casing.ads \
 
97
@@ -2006,6 +2018,7 @@
 
98
 ada/exp_ch9.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
 
99
    ada/a-uncdea.ads ada/alloc.ads ada/aspects.ads ada/atree.ads \
 
100
    ada/atree.adb ada/casing.ads ada/checks.ads ada/csets.ads ada/debug.ads \
 
101
+   ada/atree-copy_separate_list.ads ada/atree-copy_separate_list.adb \
 
102
    ada/einfo.ads ada/einfo.adb ada/elists.ads ada/elists.adb \
 
103
    ada/err_vars.ads ada/errout.ads ada/erroutc.ads ada/exp_aggr.ads \
 
104
    ada/exp_ch11.ads ada/exp_ch3.ads ada/exp_ch6.ads ada/exp_ch7.ads \