public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Fix bad assignment of Is_Accessibility_Actual
@ 2009-11-30 14:09 Arnaud Charlet
  0 siblings, 0 replies; only message in thread
From: Arnaud Charlet @ 2009-11-30 14:09 UTC (permalink / raw)
  To: gcc-patches; +Cc: Robert Dewar

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]

This patch fixes an incorrect use of the reserved Flag12 for the
recently added flag Is_Accessibility_Actual. It is quite unlikely
that there are any actual bugs caused by this, but in any case this
was a very recent addition, now fixed, so no need for a test case.
This patch also fixes the failure of csinfo to clearly diagnose
this error. Again, no test required, since no change in functional
behavior of the compiler from this change (csinfo is strictly an
internal development tool).

Tested on x86_64-pc-linux-gnu, committed on trunk

2009-11-30  Robert Dewar  <dewar@adacore.com>

	* csinfo.adb: Terminate run if improper use of reserved flag
	* sinfo.ads, sinfo.adb (Is_Accessibility_Actual): Don't use reserved
	Flag12, used Flag13 instead.
	

[-- Attachment #2: difs --]
[-- Type: text/plain, Size: 4169 bytes --]

Index: csinfo.adb
===================================================================
--- csinfo.adb	(revision 154755)
+++ csinfo.adb	(working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2008, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2009, 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- --
@@ -23,10 +23,10 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  Program to check consistency of sinfo.ads and sinfo.adb. Checks that
---  field name usage is consistent and that assertion cross-reference lists
---  are correct, as well as making sure that all the comments on field name
---  usage are consistent.
+--  Program to check consistency of sinfo.ads and sinfo.adb. Checks that field
+--  name usage is consistent and that assertion cross-reference lists are
+--  correct, as well as making sure that all the comments on field name usage
+--  are consistent.
 
 with Ada.Strings.Unbounded;         use Ada.Strings.Unbounded;
 with Ada.Strings.Unbounded.Text_IO; use Ada.Strings.Unbounded.Text_IO;
@@ -296,6 +296,7 @@ begin
 
       if Bad then
          Put_Line ("fields conflict with standard fields for node " & Node);
+         raise Done;
       end if;
    end loop;
 
Index: sinfo.adb
===================================================================
--- sinfo.adb	(revision 154792)
+++ sinfo.adb	(working copy)
@@ -1588,7 +1588,7 @@ package body Sinfo is
    begin
       pragma Assert (False
         or else NT (N).Nkind = N_Parameter_Association);
-      return Flag12 (N);
+      return Flag13 (N);
    end Is_Accessibility_Actual;
 
    function Is_Asynchronous_Call_Block
@@ -4458,7 +4458,7 @@ package body Sinfo is
    begin
       pragma Assert (False
         or else NT (N).Nkind = N_Parameter_Association);
-      Set_Flag12 (N, Val);
+      Set_Flag13 (N, Val);
    end Set_Is_Accessibility_Actual;
 
    procedure Set_Is_Asynchronous_Call_Block
Index: sinfo.ads
===================================================================
--- sinfo.ads	(revision 154792)
+++ sinfo.ads	(working copy)
@@ -1179,7 +1179,7 @@ package Sinfo is
    --    to the node for the spec of the instance, inserted as part of the
    --    semantic processing for instantiations in Sem_Ch12.
 
-   --  Is_Accessibility_Actual (Flag12-Sem)
+   --  Is_Accessibility_Actual (Flag13-Sem)
    --    Present in N_Parameter_Association nodes. True if the parameter is
    --    an extra actual that carries the accessibility level of the actual
    --    for an access parameter, in a function that dispatches on result and
@@ -4461,7 +4461,7 @@ package Sinfo is
       --  Selector_Name (Node2) (always non-Empty)
       --  Explicit_Actual_Parameter (Node3)
       --  Next_Named_Actual (Node4-Sem)
-      --  Is_Accessibility_Actual (Flag12-Sem)
+      --  Is_Accessibility_Actual (Flag13-Sem)
 
       ---------------------------
       -- 6.4  Actual Parameter --
@@ -8090,7 +8090,7 @@ package Sinfo is
      (N : Node_Id) return Uint;       -- Uint3
 
    function Is_Accessibility_Actual
-     (N : Node_Id) return Boolean;    -- Flag12
+     (N : Node_Id) return Boolean;    -- Flag13
 
    function Is_Asynchronous_Call_Block
      (N : Node_Id) return Boolean;    -- Flag7
@@ -9005,7 +9005,7 @@ package Sinfo is
      (N : Node_Id; Val : Uint);               -- Uint3
 
    procedure Set_Is_Accessibility_Actual
-     (N : Node_Id; Val : Boolean := True);    -- Flag12
+     (N : Node_Id; Val : Boolean := True);    -- Flag13
 
    procedure Set_Is_Asynchronous_Call_Block
      (N : Node_Id; Val : Boolean := True);    -- Flag7

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-30 14:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-30 14:09 [Ada] Fix bad assignment of Is_Accessibility_Actual Arnaud Charlet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).