diff gcc/ada/debug.adb @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
line wrap: on
line diff
--- a/gcc/ada/debug.adb	Fri Oct 27 22:46:09 2017 +0900
+++ b/gcc/ada/debug.adb	Thu Oct 25 07:37:49 2018 +0900
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2017, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2018, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -145,6 +145,60 @@
    --  d.Y
    --  d.Z  Do not enable expansion in configurable run-time mode
 
+   --  d_a  Stop elaboration checks on accept or select statement
+   --  d_b
+   --  d_c
+   --  d_d
+   --  d_e  Ignore entry calls and requeue statements for elaboration
+   --  d_f  Issue info messages related to GNATprove usage
+   --  d_g
+   --  d_h
+   --  d_i  Ignore activations and calls to instances for elaboration
+   --  d_j
+   --  d_k
+   --  d_l
+   --  d_m
+   --  d_n
+   --  d_o
+   --  d_p  Ignore assertion pragmas for elaboration
+   --  d_q
+   --  d_r
+   --  d_s  Stop elaboration checks on synchronous suspension
+   --  d_t
+   --  d_u
+   --  d_v
+   --  d_w
+   --  d_x
+   --  d_y
+   --  d_z
+
+   --  d_A  Stop generation of ALI file
+   --  d_B
+   --  d_C
+   --  d_D
+   --  d_E
+   --  d_F
+   --  d_G
+   --  d_H
+   --  d_I
+   --  d_J
+   --  d_K
+   --  d_L  Output trace information on elaboration checking
+   --  d_M
+   --  d_N
+   --  d_O
+   --  d_P
+   --  d_Q
+   --  d_R
+   --  d_S
+   --  d_T
+   --  d_U
+   --  d_V
+   --  d_W
+   --  d_X
+   --  d_Y
+   --  d_Z
+
    --  d1   Error msgs have node numbers where possible
    --  d2   Eliminate error flags in verbose form error messages
    --  d3   Dump bad node in Comperr on an abort
@@ -161,10 +215,20 @@
    --  d.4  Do not delete generated C file in case of errors
    --  d.5  Do not generate imported subprogram definitions in C code
    --  d.6  Do not avoid declaring unreferenced types in C code
-   --  d.7
+   --  d.7  Disable unsound heuristics in gnat2scil (for CP as SPARK prover)
    --  d.8
    --  d.9  Disable build-in-place for nonlimited types
 
+   --  d_1
+   --  d_2
+   --  d_3
+   --  d_4
+   --  d_5
+   --  d_6
+   --  d_7
+   --  d_8
+   --  d_9
+
    --  Debug flags for binder (GNATBIND)
 
    --  da  All links (including internal units) listed if there is a cycle
@@ -415,8 +479,8 @@
    --       error messages are target dependent and irrelevant.
 
    --  dL   The compiler ignores calls in instances and invoke subprograms
-   --       which are external to the instance for the static elaboration
-   --       model. This switch is orthogonal to d.G.
+   --       which are external to the instance for both the static and dynamic
+   --       elaboration models.
 
    --  dM   Assume all variables have been modified, and ignore current value
    --       indications. This debug flag disconnects the tracking of constant
@@ -670,8 +734,7 @@
    --  d.G  Previously the compiler ignored calls via generic formal parameters
    --       when doing the analysis for the static elaboration model. This is
    --       now fixed, but we provide this debug flag to revert to the previous
-   --       situation of ignoring such calls to aid in transition. This switch
-   --       is orthogonal to dL.
+   --       situation of ignoring such calls to aid in transition.
 
    --  d.H  Sets ASIS_GNSA_Mode to True. This signals the front end to suppress
    --       the call to gigi in ASIS_Mode.
@@ -759,6 +822,39 @@
    --       case if debug flag -gnatd.Z is used. This is to deal with the case
    --       where we discover difficulties in this new processing.
 
+   --  d_a  The compiler stops the examination of a task body once it reaches
+   --       an accept or select statement for the static elaboration model. The
+   --       behavior is similar to that of No_Entry_Calls_In_Elaboration_Code,
+   --       but does not penalize actual entry calls in elaboration code.
+
+   --  d_e  The compiler ignores simple entry calls, asynchronous transfer of
+   --       control, conditional entry calls, timed entry calls, and requeue
+   --       statements in both the static and dynamic elaboration models.
+
+   --  d_f  Issue info messages related to GNATprove usage to help users
+   --       understand analysis results. By default these are not issued as
+   --       beginners find them confusing. Set automatically by GNATprove when
+   --       switch --info is used.
+
+   --  d_i  The compiler ignores calls and task activations when they target a
+   --       subprogram or task type defined in an external instance for both
+   --       the static and dynamic elaboration models.
+
+   --  d_p  The compiler ignores calls to subprograms which verify the run-time
+   --       semantics of invariants and postconditions in both the static and
+   --       dynamic elaboration models.
+
+   --  d_s  The compiler stops the examination of a task body once it reaches
+   --       a call to routine Ada.Synchronous_Task_Control.Suspend_Until_True
+   --       or Ada.Synchronous_Barriers.Wait_For_Release.
+
+   --  d_A  Do not generate ALI files by setting Opt.Disable_ALI_File.
+
+   --  d_L  Output trace information on elaboration checking. This debug switch
+   --       causes output to be generated showing each call or instantiation as
+   --       it is checked, and the progress of the recursive trace through
+   --       elaboration calls at compile time.
+
    --  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
@@ -827,6 +923,12 @@
    --       referenced by the generated C code. This debug flag restores the
    --       output of all the types.
 
+   --  d.7  Indicates (to gnat2scil) that CodePeer is being invoked as a
+   --       prover by the SPARK tools and that therefore gnat2scil should
+   --       avoid SCIL generation strategies which can introduce soundness
+   --       issues (e.g., assuming that a low bound of an array parameter
+   --       of an unconstrained subtype belongs to the index subtype).
+
    --  d.9  Enable build-in-place for function calls returning some nonlimited
    --       types.
 
@@ -938,7 +1040,7 @@
    --------------------
 
    procedure Set_Debug_Flag (C : Character; Val : Boolean := True) is
-      subtype Dig is Character range '1' .. '9';
+      subtype Dig  is Character range '1' .. '9';
       subtype LLet is Character range 'a' .. 'z';
       subtype ULet is Character range 'A' .. 'Z';
 
@@ -1084,7 +1186,7 @@
    ---------------------------
 
    procedure Set_Dotted_Debug_Flag (C : Character; Val : Boolean := True) is
-      subtype Dig is Character range '1' .. '9';
+      subtype Dig  is Character range '1' .. '9';
       subtype LLet is Character range 'a' .. 'z';
       subtype ULet is Character range 'A' .. 'Z';
 
@@ -1225,4 +1327,153 @@
       end if;
    end Set_Dotted_Debug_Flag;
 
+   --------------------------------
+   -- Set_Underscored_Debug_Flag --
+   --------------------------------
+
+   procedure Set_Underscored_Debug_Flag
+     (C   : Character;
+      Val : Boolean := True)
+   is
+      subtype Dig  is Character range '1' .. '9';
+      subtype LLet is Character range 'a' .. 'z';
+      subtype ULet is Character range 'A' .. 'Z';
+
+   begin
+      if C in Dig then
+         case Dig (C) is
+            when '1' =>
+               Debug_Flag_Underscore_1 := Val;
+            when '2' =>
+               Debug_Flag_Underscore_2 := Val;
+            when '3' =>
+               Debug_Flag_Underscore_3 := Val;
+            when '4' =>
+               Debug_Flag_Underscore_4 := Val;
+            when '5' =>
+               Debug_Flag_Underscore_5 := Val;
+            when '6' =>
+               Debug_Flag_Underscore_6 := Val;
+            when '7' =>
+               Debug_Flag_Underscore_7 := Val;
+            when '8' =>
+               Debug_Flag_Underscore_8 := Val;
+            when '9' =>
+               Debug_Flag_Underscore_9 := Val;
+         end case;
+
+      elsif C in ULet then
+         case ULet (C) is
+            when 'A' =>
+               Debug_Flag_Underscore_AA := Val;
+            when 'B' =>
+               Debug_Flag_Underscore_BB := Val;
+            when 'C' =>
+               Debug_Flag_Underscore_CC := Val;
+            when 'D' =>
+               Debug_Flag_Underscore_DD := Val;
+            when 'E' =>
+               Debug_Flag_Underscore_EE := Val;
+            when 'F' =>
+               Debug_Flag_Underscore_FF := Val;
+            when 'G' =>
+               Debug_Flag_Underscore_GG := Val;
+            when 'H' =>
+               Debug_Flag_Underscore_HH := Val;
+            when 'I' =>
+               Debug_Flag_Underscore_II := Val;
+            when 'J' =>
+               Debug_Flag_Underscore_JJ := Val;
+            when 'K' =>
+               Debug_Flag_Underscore_KK := Val;
+            when 'L' =>
+               Debug_Flag_Underscore_LL := Val;
+            when 'M' =>
+               Debug_Flag_Underscore_MM := Val;
+            when 'N' =>
+               Debug_Flag_Underscore_NN := Val;
+            when 'O' =>
+               Debug_Flag_Underscore_OO := Val;
+            when 'P' =>
+               Debug_Flag_Underscore_PP := Val;
+            when 'Q' =>
+               Debug_Flag_Underscore_QQ := Val;
+            when 'R' =>
+               Debug_Flag_Underscore_RR := Val;
+            when 'S' =>
+               Debug_Flag_Underscore_SS := Val;
+            when 'T' =>
+               Debug_Flag_Underscore_TT := Val;
+            when 'U' =>
+               Debug_Flag_Underscore_UU := Val;
+            when 'V' =>
+               Debug_Flag_Underscore_VV := Val;
+            when 'W' =>
+               Debug_Flag_Underscore_WW := Val;
+            when 'X' =>
+               Debug_Flag_Underscore_XX := Val;
+            when 'Y' =>
+               Debug_Flag_Underscore_YY := Val;
+            when 'Z' =>
+               Debug_Flag_Underscore_ZZ := Val;
+         end case;
+
+      else
+         case LLet (C) is
+            when 'a' =>
+               Debug_Flag_Underscore_A := Val;
+            when 'b' =>
+               Debug_Flag_Underscore_B := Val;
+            when 'c' =>
+               Debug_Flag_Underscore_C := Val;
+            when 'd' =>
+               Debug_Flag_Underscore_D := Val;
+            when 'e' =>
+               Debug_Flag_Underscore_E := Val;
+            when 'f' =>
+               Debug_Flag_Underscore_F := Val;
+            when 'g' =>
+               Debug_Flag_Underscore_G := Val;
+            when 'h' =>
+               Debug_Flag_Underscore_H := Val;
+            when 'i' =>
+               Debug_Flag_Underscore_I := Val;
+            when 'j' =>
+               Debug_Flag_Underscore_J := Val;
+            when 'k' =>
+               Debug_Flag_Underscore_K := Val;
+            when 'l' =>
+               Debug_Flag_Underscore_L := Val;
+            when 'm' =>
+               Debug_Flag_Underscore_M := Val;
+            when 'n' =>
+               Debug_Flag_Underscore_N := Val;
+            when 'o' =>
+               Debug_Flag_Underscore_O := Val;
+            when 'p' =>
+               Debug_Flag_Underscore_P := Val;
+            when 'q' =>
+               Debug_Flag_Underscore_Q := Val;
+            when 'r' =>
+               Debug_Flag_Underscore_R := Val;
+            when 's' =>
+               Debug_Flag_Underscore_S := Val;
+            when 't' =>
+               Debug_Flag_Underscore_T := Val;
+            when 'u' =>
+               Debug_Flag_Underscore_U := Val;
+            when 'v' =>
+               Debug_Flag_Underscore_V := Val;
+            when 'w' =>
+               Debug_Flag_Underscore_W := Val;
+            when 'x' =>
+               Debug_Flag_Underscore_X := Val;
+            when 'y' =>
+               Debug_Flag_Underscore_Y := Val;
+            when 'z' =>
+               Debug_Flag_Underscore_Z := Val;
+         end case;
+      end if;
+   end Set_Underscored_Debug_Flag;
+
 end Debug;