]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 30 Nov 2009 14:24:04 +0000 (15:24 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 30 Nov 2009 14:24:04 +0000 (15:24 +0100)
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.

From-SVN: r154809

gcc/ada/ChangeLog
gcc/ada/exp_ch3.adb
gcc/ada/exp_ch6.adb
gcc/ada/exp_ch7.adb
gcc/ada/opt.ads
gcc/ada/prj-env.adb
gcc/ada/sem_scil.adb

index 8900a23ac5ba65894e81af59a2d2181b2e598e98..6477c1e540f393037caa6e76b5d2815c1bc89ff7 100644 (file)
@@ -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.
index f32f0e2884699c1832850a8883fbd378e528cb6e..13454c71858739cb42e3e8e9cb42fdd9180ae8a2 100644 (file)
@@ -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;
index c1135407ebd8b82091619ab17de3830f6d496931..1e4ea01141dc13b3c7226680a9d393f6112f89ec 100644 (file)
@@ -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;
index db3cd20baf1e13b59b547373ad3282a523773402..880ae4e4cb9e6cd304d343c2dd9f5659395aab64 100644 (file)
@@ -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)));
index 1bb837a467b4263a9b0fa225967e68e8095aade3..9013d7d3dcd5e58077286b6aad3ef99700a1c0a2 100644 (file)
@@ -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
index c5182abea09e00a65962c9d5b2ea3a7419f0366c..f7fc668dd8f76b4c46383876956090e30f6c0e16 100644 (file)
@@ -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
index 977c07d6ddfe1cf37c397cb44bed0a2e7563971b..5adf803fc703e61c231697d29a2f66abce32502a 100644 (file)
@@ -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