aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch7.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-31 10:52:34 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-31 10:52:34 +0200
commitd2b4b3da0d21bea1af905d255971a4869b5617cc (patch)
tree0c2f94cab822bc88416087991bfbbfc801389ebd /gcc/ada/exp_ch7.adb
parent16c3301a61b99c5e55c90f3fa73d83c9478798d9 (diff)
downloadgcc-d2b4b3da0d21bea1af905d255971a4869b5617cc.zip
gcc-d2b4b3da0d21bea1af905d255971a4869b5617cc.tar.gz
gcc-d2b4b3da0d21bea1af905d255971a4869b5617cc.tar.bz2
[multiple changes]
2011-08-31 Yannick Moy <moy@adacore.com> * sem_ch4.adb: Code clean up. 2011-08-31 Yannick Moy <moy@adacore.com> * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice. 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize and TSS primitive Finalize_Address if finalization is suppressed. (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS primitive Finalize_Address if finalization is suppressed. 2011-08-31 Jose Ruiz <ruiz@adacore.com> * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make sure that the underlying task has already been created before trying to change its affinity. (Set_CPU): Use the term processor instead of CPU, as we do in Assign_Task. 2011-08-31 Vincent Celier <celier@adacore.com> * prj-attr.adb: New Compiler attribute Source_File_Switches. * prj-nmsc.adb (Process_Compiler): Process attribute Source_File_Switches. * prj.ads (Language_Config): New name list component Name_Source_File_Switches. * snames.ads-tmpl (Name_Source_File_Switches): New standard name. 2011-08-31 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a discriminated component of an actual, expand at once to prevent ouf-of-order references with generated subtypes. 2011-08-31 Yannick Moy <moy@adacore.com> * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read reference to operator in Alfa xrefs. 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case where the parent instance was frozen before the current instance due to the presence of a source body. Update calls to Insert_After_Last_Decl. (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance. Update the comment which illustrates the purpose of the routine. Package instances are now frozen by source bodies which appear after the instance. This ensures that entities coming from within the instance are available for use in the said bodies. (Install_Body): Add code to handle the case where the parent instance was frozen before the current instance due to the presence of a source body. Update calls to Insert_After_Last_Decl. From-SVN: r178360
Diffstat (limited to 'gcc/ada/exp_ch7.adb')
-rw-r--r--gcc/ada/exp_ch7.adb54
1 files changed, 32 insertions, 22 deletions
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index 6318c42..74de4b0 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -434,21 +434,26 @@ package body Exp_Ch7 is
Stmts => Make_Deep_Array_Body (Adjust_Case, Typ)));
end if;
- Set_TSS (Typ,
- Make_Deep_Proc
- (Prim => Finalize_Case,
- Typ => Typ,
- Stmts => Make_Deep_Array_Body (Finalize_Case, Typ)));
+ -- Do not generate Deep_Finalize and Finalize_Address if finalization is
+ -- suppressed since these routine will not be used.
- -- Create TSS primitive Finalize_Address for non-VM targets. JVM and
- -- .NET do not support address arithmetic and unchecked conversions.
-
- if VM_Target = No_VM then
+ if not Restriction_Active (No_Finalization) then
Set_TSS (Typ,
Make_Deep_Proc
- (Prim => Address_Case,
+ (Prim => Finalize_Case,
Typ => Typ,
- Stmts => Make_Deep_Array_Body (Address_Case, Typ)));
+ Stmts => Make_Deep_Array_Body (Finalize_Case, Typ)));
+
+ -- Create TSS primitive Finalize_Address for non-VM targets. JVM and
+ -- .NET do not support address arithmetic and unchecked conversions.
+
+ if VM_Target = No_VM then
+ Set_TSS (Typ,
+ Make_Deep_Proc
+ (Prim => Address_Case,
+ Typ => Typ,
+ Stmts => Make_Deep_Array_Body (Address_Case, Typ)));
+ end if;
end if;
end Build_Array_Deep_Procs;
@@ -3090,21 +3095,26 @@ package body Exp_Ch7 is
Stmts => Make_Deep_Record_Body (Adjust_Case, Typ)));
end if;
- Set_TSS (Typ,
- Make_Deep_Proc
- (Prim => Finalize_Case,
- Typ => Typ,
- Stmts => Make_Deep_Record_Body (Finalize_Case, Typ)));
+ -- Do not generate Deep_Finalize and Finalize_Address if finalization is
+ -- suppressed since these routine will not be used.
- -- Create TSS primitive Finalize_Address for non-VM targets. JVM and
- -- .NET do not support address arithmetic and unchecked conversions.
-
- if VM_Target = No_VM then
+ if not Restriction_Active (No_Finalization) then
Set_TSS (Typ,
Make_Deep_Proc
- (Prim => Address_Case,
+ (Prim => Finalize_Case,
Typ => Typ,
- Stmts => Make_Deep_Record_Body (Address_Case, Typ)));
+ Stmts => Make_Deep_Record_Body (Finalize_Case, Typ)));
+
+ -- Create TSS primitive Finalize_Address for non-VM targets. JVM and
+ -- .NET do not support address arithmetic and unchecked conversions.
+
+ if VM_Target = No_VM then
+ Set_TSS (Typ,
+ Make_Deep_Proc
+ (Prim => Address_Case,
+ Typ => Typ,
+ Stmts => Make_Deep_Record_Body (Address_Case, Typ)));
+ end if;
end if;
end Build_Record_Deep_Procs;