2013-09-10 Thomas Quinot <quinot@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Sep 2013 15:02:33 +0000 (15:02 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Sep 2013 15:02:33 +0000 (15:02 +0000)
* adaint.c (__gnat_is_executable_file_attr): Should be true
for an executable regular file only only (not for a directory
that has the executable permission).

2013-09-10  Ed Schonberg  <schonberg@adacore.com>

* sem_res.adb: Further work on operator calls in ASIS.

2013-09-10  Yannick Moy  <moy@adacore.com>

* sinfo.ads, sem_prag.ads, sem_ch13.adb: Minor correction and comment
update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202459 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/adaint.c
gcc/ada/sem_ch13.adb
gcc/ada/sem_prag.ads
gcc/ada/sem_res.adb
gcc/ada/sinfo.ads

index 13d2590..cbf0079 100644 (file)
@@ -1,5 +1,20 @@
 2013-09-10  Thomas Quinot  <quinot@adacore.com>
 
+       * adaint.c (__gnat_is_executable_file_attr): Should be true
+       for an executable regular file only only (not for a directory
+       that has the executable permission).
+
+2013-09-10  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_res.adb: Further work on operator calls in ASIS.
+
+2013-09-10  Yannick Moy  <moy@adacore.com>
+
+       * sinfo.ads, sem_prag.ads, sem_ch13.adb: Minor correction and comment
+       update.
+
+2013-09-10  Thomas Quinot  <quinot@adacore.com>
+
        * aspects.ads, sem_ch13.adb: Minor reformatting.
        * adaint.c (__gnat_set_close_on_exec): Add comment documenting
        that this routine is shared between OS_Lib and Sockets.
index 850e1fc..f76edb7 100644 (file)
@@ -2264,7 +2264,7 @@ __gnat_is_executable_file_attr (char* name, struct file_attributes* attr)
 #endif
    }
 
-   return attr->executable;
+   return attr->regular && attr->executable;
 }
 
 int
index edaf8e7..40cc729 100644 (file)
@@ -1378,7 +1378,7 @@ package body Sem_Ch13 is
                if Is_Ignored (Aspect) then
                   Set_Is_Ignored (Aitem);
                elsif Is_Checked (Aspect) then
-                  Set_Is_Checked (Aspect);
+                  Set_Is_Checked (Aitem);
                end if;
 
                Set_Corresponding_Aspect (Aitem, Aspect);
@@ -1396,7 +1396,7 @@ package body Sem_Ch13 is
 
             --  Skip looking at aspect if it is totally disabled. Just mark
             --  it as such for later reference in the tree. This also sets
-            --  the Is_Ignored flag appropriately.
+            --  the Is_Ignored and Is_Checked flags appropriately.
 
             Check_Applicable_Policy (Aspect);
 
index 7819931..ecfb3ed 100644 (file)
@@ -76,9 +76,10 @@ package Sem_Prag is
    --  If the name is a valid assertion kind name, then the Check_Policy pragma
    --  chain is checked for a matching entry (or for an Assertion entry which
    --  matches all possibilities). If a matching entry is found then the policy
-   --  is checked. If it is Off, Ignore, or Disable, then the Is_Ignored flag
-   --  is set in the aspect or pragma node. Additionally for policy Disable,
-   --  the Is_Disabled flag is set.
+   --  is checked. If it is On or Check, then the Is_Checked flag is set in
+   --  the aspect or pragma node. If it is Off, Ignore, or Disable, then the
+   --  Is_Ignored flag is set in the aspect or pragma node. Additionally for
+   --  policy Disable, the Is_Disabled flag is set.
    --
    --  If no matching Check_Policy pragma is found then the effect depends on
    --  whether -gnata was used, if so, then the call has no effect, otherwise
index 61f7712..e08370e 100644 (file)
@@ -1583,15 +1583,16 @@ package body Sem_Res is
 
       if ASIS_Mode and then Nkind (N) in N_Op then
          if Is_Binary then
-            Set_Parameter_Associations
-              (Original_Node (N),
-               New_List (New_Copy_Tree (Left_Opnd (N)),
-                         New_Copy_Tree (Right_Opnd (N))));
+            Rewrite (First (Parameter_Associations (Original_Node (N))),
+               New_Copy_Tree (Left_Opnd (N)));
+            Rewrite (Next (First (Parameter_Associations (Original_Node (N)))),
+               New_Copy_Tree (Right_Opnd (N)));
          else
-            Set_Parameter_Associations
-              (Original_Node (N),
-               New_List (New_Copy_Tree (Right_Opnd (N))));
+            Rewrite (First (Parameter_Associations (Original_Node (N))),
+               New_Copy_Tree (Right_Opnd (N)));
          end if;
+
+         Set_Parent (Original_Node (N), Parent (N));
       end if;
    end Make_Call_Into_Operator;
 
index 906077b..78ab2c1 100644 (file)
@@ -1272,7 +1272,7 @@ package Sinfo is
    --  Is_Checked (Flag11-Sem)
    --    Present in N_Aspect_Specification and N_Pragma nodes. Set for an
    --    assertion aspect or pragma, or check pragma for an assertion, that
-   --    is to be checked at run time. If either Is_Checked or Is_Ignored
+   --    is to be checked at run time. If either Is_Checked or Is_Ignored
    --    is set (they cannot both be set), then this means that the status of
    --    the pragma has been checked at the appropriate point and should not
    --    be further modified (in some cases these flags are copied when a