summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-30 14:24:04 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-30 14:24:04 +0000
commitc9c1031f97ec7b5db12dbac917f5f1c4b89cc6f3 (patch)
tree10d56ada1996a161049dab7dc4e5c8971e58a022
parentab759dab85d933ba536cd4d60e7cd5058d91d46e (diff)
downloadgcc-c9c1031f97ec7b5db12dbac917f5f1c4b89cc6f3.tar.gz
2009-11-30 Javier Miranda <miranda@adacore.com>
* exp_ch6.adb, sem_scil.adb (Adjust_SCIL_Node): Add missing management of N_Unchecked_Type_Conversion nodes when searching for SCIL nodes. (Expand_Call): Adjust decoration of SCIL node associated with relocated function call. 2009-11-30 Emmanuel Briot <briot@adacore.com> * prj-env.adb (Add_To_Source_Path): Preserve casing of directories 2009-11-30 Vincent Celier <celier@adacore.com> * opt.ads (No_Split_Units): New flag initialized to False 2009-11-30 Jerome Lambourg <lambourg@adacore.com> * exp_ch7.adb (Needs_Finalization): Add comments. * exp_ch3.adb (Make_Predefined_Primitive_Specs): Improve handling of CIL Value types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154809 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog21
-rw-r--r--gcc/ada/exp_ch3.adb9
-rw-r--r--gcc/ada/exp_ch6.adb13
-rw-r--r--gcc/ada/exp_ch7.adb27
-rw-r--r--gcc/ada/opt.ads6
-rw-r--r--gcc/ada/prj-env.adb2
-rw-r--r--gcc/ada/sem_scil.adb4
7 files changed, 69 insertions, 13 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 8900a23ac5b..6477c1e540f 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,24 @@
+2009-11-30 Javier Miranda <miranda@adacore.com>
+
+ * exp_ch6.adb, sem_scil.adb (Adjust_SCIL_Node): Add missing management
+ of N_Unchecked_Type_Conversion nodes when searching for SCIL nodes.
+ (Expand_Call): Adjust decoration of SCIL node associated with relocated
+ function call.
+
+2009-11-30 Emmanuel Briot <briot@adacore.com>
+
+ * prj-env.adb (Add_To_Source_Path): Preserve casing of directories
+
+2009-11-30 Vincent Celier <celier@adacore.com>
+
+ * opt.ads (No_Split_Units): New flag initialized to False
+
+2009-11-30 Jerome Lambourg <lambourg@adacore.com>
+
+ * exp_ch7.adb (Needs_Finalization): Add comments.
+ * exp_ch3.adb (Make_Predefined_Primitive_Specs): Improve handling of
+ CIL Value types.
+
2009-11-30 Robert Dewar <dewar@adacore.com>
* osint.adb, a-rttiev.adb: Minor reformatting.
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index f32f0e28846..13454c71858 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -8104,6 +8104,11 @@ package body Exp_Ch3 is
elsif Restriction_Active (No_Finalization) then
null;
+ -- We skip these for CIL Value types (why???)
+
+ elsif Is_Value_Type (Tag_Typ) then
+ null;
+
elsif Etype (Tag_Typ) = Tag_Typ
or else Needs_Finalization (Tag_Typ)
@@ -8121,9 +8126,7 @@ package body Exp_Ch3 is
and then not Is_Limited_Interface (Tag_Typ)
and then Is_Limited_Interface (Etype (Tag_Typ)))
then
- if not Is_Limited_Type (Tag_Typ)
- and then not Is_Value_Type (Tag_Typ)
- then
+ if not Is_Limited_Type (Tag_Typ) then
Append_To (Res,
Predef_Deep_Spec (Loc, Tag_Typ, TSS_Deep_Adjust));
end if;
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index c1135407ebd..1e4ea01141d 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -2779,6 +2779,19 @@ package body Exp_Ch6 is
Unchecked_Convert_To (Parent_Typ,
Relocate_Node (Actual)));
+ -- If the relocated node is a function call then it
+ -- can be part of the expansion of the predefined
+ -- equality operator of a tagged type and we may
+ -- need to adjust its SCIL dispatching node.
+
+ if Generate_SCIL
+ and then Nkind (Actual) /= N_Null
+ and then Nkind (Expression (Actual))
+ = N_Function_Call
+ then
+ Adjust_SCIL_Node (Actual, Expression (Actual));
+ end if;
+
Analyze (Actual);
Resolve (Actual, Parent_Typ);
end if;
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index db3cd20baf1..880ae4e4cb9 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -3287,18 +3287,29 @@ package body Exp_Ch7 is
-- Start of processing for Needs_Finalization
begin
- -- Class-wide types must be treated as controlled because they may
- -- contain an extension that has controlled components.
+ return
+
+ -- Class-wide types must be treated as controlled and therefore
+ -- requiring finalization (because they may be extended with an
+ -- extension that has controlled components.
+
+ (Is_Class_Wide_Type (T)
+
+ -- However, avoid treating class-wide types as controlled if
+ -- finalization is not available and in particular CIL value
+ -- types never have finalization).
- -- We can skip this if finalization is not available.
- -- or if it is a value type (because ???)
+ and then not In_Finalization_Root (T)
+ and then not Restriction_Active (No_Finalization)
+ and then not Is_Value_Type (Etype (T)))
+
+ -- Controlled types always need finalization
- return (Is_Class_Wide_Type (T)
- and then not In_Finalization_Root (T)
- and then not Restriction_Active (No_Finalization)
- and then not Is_Value_Type (Etype (T)))
or else Is_Controlled (T)
or else Has_Some_Controlled_Component (T)
+
+ -- For concurrent types, test the corresponding record type
+
or else (Is_Concurrent_Type (T)
and then Present (Corresponding_Record_Type (T))
and then Needs_Finalization (Corresponding_Record_Type (T)));
diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads
index 1bb837a467b..9013d7d3dcd 100644
--- a/gcc/ada/opt.ads
+++ b/gcc/ada/opt.ads
@@ -861,6 +861,12 @@ package Opt is
-- This flag is set True if a No_Run_Time pragma is encountered. See
-- spec of Rtsfind for a full description of handling of this pragma.
+ No_Split_Units : Boolean := False;
+ -- GPRBUILD
+ -- Set to True with switch --no-split-units. When True, unit sources, spec,
+ -- body and subunits, must all be in the same project.This is checked after
+ -- each compilation.
+
No_Stdinc : Boolean := False;
-- GNAT, GNATBIND, GNATMAKE, GNATFIND, GNATXREF
-- Set to True if no default source search dirs added to search list
diff --git a/gcc/ada/prj-env.adb b/gcc/ada/prj-env.adb
index c5182abea09..f7fc668dd8f 100644
--- a/gcc/ada/prj-env.adb
+++ b/gcc/ada/prj-env.adb
@@ -410,7 +410,7 @@ package body Prj.Env is
end loop;
if Add_It then
- Source_Path_Table.Append (Source_Paths, Source_Dir.Value);
+ Source_Path_Table.Append (Source_Paths, Source_Dir.Display_Value);
end if;
-- Next source directory
diff --git a/gcc/ada/sem_scil.adb b/gcc/ada/sem_scil.adb
index 977c07d6ddf..5adf803fc70 100644
--- a/gcc/ada/sem_scil.adb
+++ b/gcc/ada/sem_scil.adb
@@ -74,7 +74,9 @@ package body Sem_SCIL is
-- Type conversions may involve dispatching calls to functions whose
-- associated SCIL dispatching node needs adjustment.
- elsif Nkind (Old_Node) = N_Type_Conversion then
+ elsif Nkind_In (Old_Node, N_Type_Conversion,
+ N_Unchecked_Type_Conversion)
+ then
null;
-- Relocated subprogram call