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