gnat1drv.adb: Minor adjustments.
authorArnaud Charlet <charlet@adacore.com>
Tue, 26 May 2015 08:19:55 +0000 (08:19 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 26 May 2015 08:19:55 +0000 (10:19 +0200)
* 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
gcc/ada/einfo.ads
gcc/ada/gnat1drv.adb
gcc/ada/sem_ch4.adb

index 396f789b75614dbaf2d7eb431056bbfe648baa5a..540e11e64ac28798e546c189d721c29cce344806 100644 (file)
@@ -1,3 +1,11 @@
+2015-05-26  Arnaud Charlet  <charlet@adacore.com>
+
+       * 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  <miranda@adacore.com>
 
        * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
index 1c0ee5168d6704659d4a403b13d67f600bcadaa5..7795bf933adf1666da99481945b6aefdd4bf0391 100644 (file)
@@ -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 controlled type (Is_Controlled flag
 --      set) if the aspect Disable_Controlled is active for the type.
 
 --    Discard_Names (Flag88)
index 06d30ffc64511da26f221f6a6c200adeb720e03a..9acc0c603eb0a03d1a9b156c8f7c1bc8dc2b7599 100644 (file)
@@ -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;
index 2da3fa6735f8437aed1611e73a9160bad6ef0731..bd7a59af861a812f84409075f28f0040340282f6 100644 (file)
@@ -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);
 
    -----------------------