From 0f345950ec4144742c56a93aea07ada593e03788 Mon Sep 17 00:00:00 2001 From: Javier Miranda Date: Fri, 1 Aug 2014 10:29:51 +0000 Subject: [PATCH] gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of -gnatd.z. 2014-08-01 Javier Miranda * 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 | 7 +++++++ gcc/ada/debug.adb | 20 +++++++++----------- gcc/ada/exp_ch6.adb | 7 +++---- gcc/ada/gnat1drv.adb | 9 ++++++--- 4 files changed, 25 insertions(+), 18 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a147c918cc6..27fe80fe8d8 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2014-08-01 Javier Miranda + + * 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 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb, diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb index e2ab02e54dc..3c36e5d8033 100644 --- a/gcc/ada/debug.adb +++ b/gcc/ada/debug.adb @@ -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 diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 50bc11a5546..44488fbafce 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -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); diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index 536c321e3c1..4650548b5f0 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -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 -- 2.30.2