debug.adb: Document use of -gnatd.a and -gnatd.I
authorTristan Gingold <gingold@adacore.com>
Mon, 15 Oct 2007 13:54:21 +0000 (15:54 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 15 Oct 2007 13:54:21 +0000 (15:54 +0200)
2007-10-15  Tristan Gingold  <gingold@adacore.com>

* debug.adb: Document use of -gnatd.a and -gnatd.I

* layout.adb: On OpenVMS -gnatd.a disables alignment optimization.

From-SVN: r129321

gcc/ada/debug.adb
gcc/ada/layout.adb

index 363cc07..9ea1c3f 100644 (file)
@@ -93,7 +93,7 @@ package body Debug is
    --  dY   Enable configurable run-time mode
    --  dZ   Generate listing showing the contents of the dispatch tables
 
-   --  d.a
+   --  d.a  Disable OpenVMS alignment optimization on types
    --  d.b
    --  d.c
    --  d.d
@@ -128,7 +128,7 @@ package body Debug is
    --  d.F
    --  d.G
    --  d.H
-   --  d.I
+   --  d.I  Inspector mode
    --  d.J
    --  d.K
    --  d.L
@@ -495,6 +495,12 @@ package body Debug is
    --         - In case of abstract subprograms the text "is abstract" is
    --           added at the end of the line.
 
+   --  d.a  Disable OpenVMS alignment optimization on types.  On OpenVMS,
+   --       record types whose size is odd "in between" (e.g. 17 bits) are
+   --       over-aligned to the next power of 2 (until 8 bytes).  This over
+   --       alignment improve generated code and is more consistent with
+   --       what Dec Ada does.
+
    --  d.f  Suppress folding of static expressions. This of course results
    --       in seriously non-conforming behavior, but is useful sometimes
    --       when tracking down handling of complex expressions.
@@ -533,6 +539,10 @@ package body Debug is
    --       fully compiled and analyzed, they just get eliminated from the
    --       code generation step.
 
+   --  d.I  Inspector mode. Relevant for VM_Target /= None. Try to generate
+   --       byte code, even in case of unsupported construct, for the sake
+   --       of static analysis tools.
+
    --  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
index 744d32f..f92a37d 100644 (file)
@@ -819,6 +819,7 @@ package body Layout is
                OK  : Boolean;
                LLo : Uint;
                LHi : Uint;
+               pragma Warnings (Off, LHi);
 
             begin
                Set_Parent (Len, E);
@@ -1908,7 +1909,9 @@ package body Layout is
          First_Discr : Entity_Id;
          Last_Discr  : Entity_Id;
          Esiz        : SO_Ref;
-         RM_Siz      : SO_Ref;
+
+         RM_Siz : SO_Ref;
+         pragma Warnings (Off, SO_Ref);
 
          RM_Siz_Expr : Node_Id := Empty;
          --  Expression for the evolving RM_Siz value. This is typically a
@@ -2789,10 +2792,13 @@ package body Layout is
 
          --  On VMS, also reset for odd "in between" sizes, e.g. a 17-bit
          --  record is given an alignment of 4. This is more consistent with
-         --  what DEC Ada does.
-
-         elsif OpenVMS_On_Target and then Siz > System_Storage_Unit then
+         --  what DEC Ada does (-gnatd.a turns this off which can be used to
+         --  examine the value of this special transformation).
 
+         elsif OpenVMS_On_Target
+           and then not Debug_Flag_Dot_A
+           and then Siz > System_Storage_Unit
+         then
             if Siz <= 2 * System_Storage_Unit then
                Align := 2;
             elsif Siz <= 4 * System_Storage_Unit then