public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Arnaud Charlet <charlet@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Robert Dewar <dewar@adacore.com>
Subject: [Ada] Fix bad assignment of Is_Accessibility_Actual
Date: Mon, 30 Nov 2009 14:09:00 -0000	[thread overview]
Message-ID: <20091130140456.GA2097@adacore.com> (raw)

[-- 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

                 reply	other threads:[~2009-11-30 14:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091130140456.GA2097@adacore.com \
    --to=charlet@adacore.com \
    --cc=dewar@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).