From 716383d80338e2f1720a8c2217593e5d5d18e0db Mon Sep 17 00:00:00 2001 From: charlet Date: Mon, 20 Apr 2009 13:24:27 +0000 Subject: [PATCH] 2009-04-20 Bob Duff * sem.adb, gnat1drv.adb, debug.adb: Use the -gnatd.W switch to control debugging output. 2009-04-20 Robert Dewar * sem_attr.adb: Minor reformatting * gnatcmd.adb: Minor reformatting git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146417 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 11 +++++++++++ gcc/ada/debug.adb | 6 +++++- gcc/ada/gnat1drv.adb | 10 +++++++--- gcc/ada/gnatcmd.adb | 9 ++++----- gcc/ada/sem.adb | 8 +++++--- gcc/ada/sem_attr.adb | 7 +++---- 6 files changed, 35 insertions(+), 16 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 98d2def..3aaa6d4 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,14 @@ +2009-04-20 Bob Duff + + * sem.adb, gnat1drv.adb, debug.adb: Use the -gnatd.W switch to control + debugging output. + +2009-04-20 Robert Dewar + + * sem_attr.adb: Minor reformatting + + * gnatcmd.adb: Minor reformatting + 2009-04-20 Ed Schonberg * sem_ch4.adb (Analyze_User_Defined_Binary_Op): If left operand is diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb index 4629756..8cb47ac 100644 --- a/gcc/ada/debug.adb +++ b/gcc/ada/debug.adb @@ -140,7 +140,7 @@ package body Debug is -- d.T Force Optimize_Alignment (Time) -- d.U -- d.V - -- d.W + -- d.W Print out debugging information for Walk_Library_Items -- d.X -- d.Y -- d.Z @@ -559,6 +559,10 @@ package body Debug is -- d.T Force Optimize_Alignment (Time) mode as the default + -- d.W Print out debugging information for Walk_Library_Items, including + -- the order in which units are walked. This is primarily for SofCheck + -- Inspector. + -- d1 Error messages have node numbers where possible. Normally error -- messages have only source locations. This option is useful when -- debugging errors caused by expanded code, where the source location diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index cb73edf..1dbc6bb 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -740,9 +740,13 @@ begin Namet.Lock; Stringt.Lock; - -- ???pragma Debug (Check_Library_Items); - -- Commented out, because it currently does not work if the -gnatn - -- switch (back end inlining) is used. + -- ???Check_Library_Items under control of a debug flag, because it + -- currently does not work if the -gnatn switch (back end inlining) is + -- used. + + if Debug_Flag_Dot_WW then + Check_Library_Items; + end if; -- Here we call the back end to generate the output code diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb index ddb62c5..a412551 100644 --- a/gcc/ada/gnatcmd.adb +++ b/gcc/ada/gnatcmd.adb @@ -1051,11 +1051,10 @@ procedure GNATCmd is else declare - Switch : constant String := - Last_Switches.Table (J).all; - - ALI_File : constant String (1 .. Switch'Length + 4) := - Switch & ".ali"; + Switch : constant String := + Last_Switches.Table (J).all; + ALI_File : constant String (1 .. Switch'Length + 4) := + Switch & ".ali"; Test_Existence : Boolean := False; diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb index d1d3c91..402e17e 100644 --- a/gcc/ada/sem.adb +++ b/gcc/ada/sem.adb @@ -63,8 +63,8 @@ pragma Warnings (Off, Sem_Util); package body Sem is - Debug_Unit_Walk : constant Boolean := False; - -- Set to True to print out debugging information for Walk_Library_Items + Debug_Unit_Walk : Boolean renames Debug_Flag_Dot_WW; + -- Controls debugging printouts for Walk_Library_Items Outer_Generic_Scope : Entity_Id := Empty; -- Global reference to the outer scope that is generic. In a non @@ -1564,7 +1564,9 @@ package body Sem is Write_Unit_Info (Unit_Num, Item); end if; - -- ??? why is this commented out + -- This assertion is commented out because it fails in some + -- circumstances related to library-level generic + -- instantiations. We need to investigate why. -- ???pragma Assert (not Seen (Unit_Num)); Seen (Unit_Num) := True; diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 3e8311b..a4478ac 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -6153,12 +6153,11 @@ package body Sem_Attr is Ind : Node_Id; begin - -- In the case of a generic index type, the bounds may - -- appear static but the computation is not meaningful, - -- and may generate a spurious warning. + -- In the case of a generic index type, the bounds may appear static + -- but the computation is not meaningful in this case, and may + -- generate a spurious warning. Ind := First_Index (P_Type); - while Present (Ind) loop if Is_Generic_Type (Etype (Ind)) then return; -- 2.7.4