From 213999c2337e6a75b1c95da8e86506c5e35b80a6 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 26 May 2015 08:19:55 +0000 Subject: [PATCH] gnat1drv.adb: Minor adjustments. * gnat1drv.adb: Minor adjustments. (Adjust_Global_Switches): Disable some related flags in CodePeer mode. * sem_ch4.adb (Has_Arbitrary_Evaluation_Order, Stop_Subtree_Climbind): Code cleanup. * einfo.ads: Minor comment change. From-SVN: r223669 --- gcc/ada/ChangeLog | 8 +++++ gcc/ada/einfo.ads | 2 +- gcc/ada/gnat1drv.adb | 10 +++++++ gcc/ada/sem_ch4.adb | 70 ++++---------------------------------------- 4 files changed, 24 insertions(+), 66 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 396f789b756..540e11e64ac 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2015-05-26 Arnaud Charlet + + * gnat1drv.adb: Minor adjustments. + (Adjust_Global_Switches): Disable some related flags in CodePeer mode. + * sem_ch4.adb (Has_Arbitrary_Evaluation_Order, + Stop_Subtree_Climbind): Code cleanup. + * einfo.ads: Minor comment change. + 2015-05-26 Javier Miranda * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate): diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 1c0ee5168d6..7795bf933ad 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -912,7 +912,7 @@ package Einfo is -- incomplete type. -- Disable_Controlled (Flag253) --- Present in all entities. Set for controlled type (Is_Controlled flag +-- Present in all entities. Set for a controlled type (Is_Controlled flag -- set) if the aspect Disable_Controlled is active for the type. -- Discard_Names (Flag88) diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index 06d30ffc645..9acc0c603eb 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -202,6 +202,16 @@ procedure Gnat1drv is GNATprove_Mode := False; Debug_Flag_Dot_FF := False; + -- Turn off C tree generation, not compatible with CodePeer mode. We + -- do not expect this to happen in normal use, since both modes are + -- enabled by special tools, but it is useful to turn off these flags + -- this way when we are doing codepeer tests on existing test suites + -- that may have -gnatd.V set, to avoid the need for special casing. + + Modify_Tree_For_C := False; + Generate_C_Code := False; + Unnest_Subprogram_Mode := False; + -- Turn off inlining, confuses CodePeer output and gains nothing Front_End_Inlining := False; diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 2da3fa6735f..bd7a59af861 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -83,59 +83,10 @@ package body Sem_Ch4 is N_Pragma => True, N_Range => True, N_Slice => True, - - -- N_Array_Type_Definition - - -- why not - -- N_Array_Type_Definition => True, - -- etc ??? - - N_Constrained_Array_Definition => True, - N_Unconstrained_Array_Definition => True, - - -- N_Membership_Test - - N_In => True, - N_Not_In => True, - - -- N_Binary_Op - - N_Op_Add => True, - N_Op_Concat => True, - N_Op_Expon => True, - N_Op_Subtract => True, - - N_Op_Divide => True, - N_Op_Mod => True, - N_Op_Multiply => True, - N_Op_Rem => True, - - N_Op_And => True, - - N_Op_Eq => True, - N_Op_Ge => True, - N_Op_Gt => True, - N_Op_Le => True, - N_Op_Lt => True, - N_Op_Ne => True, - - N_Op_Or => True, - N_Op_Xor => True, - - N_Op_Rotate_Left => True, - N_Op_Rotate_Right => True, - N_Op_Shift_Left => True, - N_Op_Shift_Right => True, - N_Op_Shift_Right_Arithmetic => True, - - N_Op_Not => True, - N_Op_Plus => True, - - -- N_Subprogram_Call - - N_Function_Call => True, - N_Procedure_Call_Statement => True, - + N_Array_Type_Definition => True, + N_Membership_Test => True, + N_Binary_Op => True, + N_Subprogram_Call => True, others => False); -- The following table enumerates the nodes on which we stop climbing when @@ -155,18 +106,7 @@ package body Sem_Ch4 is N_Pragma => True, N_Procedure_Call_Statement => True, N_Simple_Return_Statement => True, - - -- N_Has_Condition - - N_Exit_Statement => True, - N_If_Statement => True, - - N_Accept_Alternative => True, - N_Delay_Alternative => True, - N_Elsif_Part => True, - N_Entry_Body_Formal_Part => True, - N_Iteration_Scheme => True, - + N_Has_Condition => True, others => False); ----------------------- -- 2.30.2