gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of -gnatd.z.
authorJavier Miranda <miranda@adacore.com>
Fri, 1 Aug 2014 10:29:51 +0000 (10:29 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 1 Aug 2014 10:29:51 +0000 (12:29 +0200)
2014-08-01  Javier Miranda  <miranda@adacore.com>

* gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
-gnatd.z.
* debug.adb: Updating documentation.
* exp_ch6.adb (Expand_Call): Remove assertion.

From-SVN: r213452

gcc/ada/ChangeLog
gcc/ada/debug.adb
gcc/ada/exp_ch6.adb
gcc/ada/gnat1drv.adb

index a147c918cc6bc4485cd50f3313a2b98ff079ce6a..27fe80fe8d8977e43d17f6a642773b80328cb52a 100644 (file)
@@ -1,3 +1,10 @@
+2014-08-01  Javier Miranda  <miranda@adacore.com>
+
+       * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
+       -gnatd.z.
+       * debug.adb: Updating documentation.
+       * exp_ch6.adb (Expand_Call): Remove assertion.
+
 2014-08-01  Robert Dewar  <dewar@adacore.com>
 
        * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
index e2ab02e54dc4103f5cd1b7fe8a857047bf498ab1..3c36e5d8033dabf2fe7edc21006fd6fbfb8bb7f0 100644 (file)
@@ -116,7 +116,7 @@ package body Debug is
    --  d.w  Do not check for infinite loops
    --  d.x  No exception handlers
    --  d.y
-   --  d.z  Enable new support for backend inlining
+   --  d.z  Disable support for back end inlining
 
    --  d.A  Read/write Aspect_Specifications hash table to tree
    --  d.B
@@ -582,16 +582,14 @@ package body Debug is
    --       fully compiled and analyzed, they just get eliminated from the
    --       code generation step.
 
-   --  d.z  Enable back end inlining on targets that have the GCC backend (ie.
-   --       all targets except AAMP, .NET and JVM). This switch has no effect
-   --       under GNATprove to avoid confusing the formal verification output,
-   --       and it has no effect if the sources are compiled with frontend
-   --       inlining (ie. -gnatN). This switch is used to evaluate the impact
-   --       of back end inlining since the GCC backend has now more support for
-   --       inlining than before, and hence most of the inlinings that are
-   --       currently handled by the frontend can be done by the backend with
-   --       the extra benefit of supporting cases which are currently rejected
-   --       by GNAT.
+   --  d.z  Disable back end inlining. Back end inlining is enabled by default
+   --       on targets that have the GCC backend (ie. all targets except AAMP,
+   --       .NET and JVM). Back end inlining has no effect under GNATprove to
+   --       avoid confusing the formal verification output, and it is disabled
+   --       if the sources are compiled with frontend inlining (ie. -gnatN) to
+   --       minimize the output differences to customers still using this
+   --       deprecated switch. The flag .z facilitates disabling the back end
+   --       inlining in case of unexpected problems.
 
    --  d.A  There seems to be a problem with ASIS if we activate the circuit
    --       for reading and writing the aspect specification hash table, so
index 50bc11a5546da91f7120ae0d8f524ab26057e8da..44488fbafceee68669e900b82e5d5a175547122f 100644 (file)
@@ -3929,12 +3929,11 @@ package body Exp_Ch6 is
             Add_Inlined_Body (Subp);
             Register_Backend_Call (Call_Node);
 
-         --  Frontend expands supported functions returning unconstrained types
+         --  Frontend expansion of supported functions returning unconstrained
+         --  types and simple renamings inlined by the frontend (see Freeze.
+         --  Build_Renamed_Entity).
 
          else
-            pragma Assert (Ekind (Subp) = E_Function
-              and then Returns_Unconstrained_Type (Subp));
-
             declare
                Spec : constant Node_Id := Unit_Declaration_Node (Subp);
 
index 536c321e3c13a215288ccd64606173d302a3b5f4..4650548b5f0fe1ea355059f1f0f0409fe06a6fb2 100644 (file)
@@ -602,13 +602,16 @@ procedure Gnat1drv is
 
         and then not GNATprove_Mode
 
-        --  No back end inlining if front end inlining explicitly enabled?
+        --  No back end inlining if front end inlining explicitly enabled.
+        --  Done to minimize the output differences to customers still using
+        --  this deprecated switch; in addition, this behavior reduces the
+        --  output differences in old tests.
 
         and then not Front_End_Inlining
 
-        --  For now, we only enable back end inlining if debug flag .z is set
+        --  Back end inlining is disabled if debug flag .z is set
 
-        and then Debug_Flag_Dot_Z;
+        and then not Debug_Flag_Dot_Z;
 
       --  Output warning if -gnateE specified and cannot be supported