[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 20 Jan 2014 15:21:18 +0000 (16:21 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 20 Jan 2014 15:21:18 +0000 (16:21 +0100)
2014-01-20  Robert Dewar  <dewar@adacore.com>

* gnat_rm.texi: Document that Loop_Variant is included in
Statement_Assertions.
* sem_prag.adb (Check_Kind): Add Loop_Variant to
Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
to Statement_Assertions.

2014-01-20  Doug Rupp  <rupp@adacore.com>

* sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
for errno ENOENT from RTP on NFS mounted file system.

From-SVN: r206821

gcc/ada/ChangeLog
gcc/ada/gnat_rm.texi
gcc/ada/sem_prag.adb
gcc/ada/sysdep.c

index f32cb22..68186c3 100644 (file)
@@ -1,3 +1,16 @@
+2014-01-20  Robert Dewar  <dewar@adacore.com>
+
+       * gnat_rm.texi: Document that Loop_Variant is included in
+       Statement_Assertions.
+       * sem_prag.adb (Check_Kind): Add Loop_Variant to
+       Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
+       to Statement_Assertions.
+
+2014-01-20  Doug Rupp  <rupp@adacore.com>
+
+       * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
+       for errno ENOENT from RTP on NFS mounted file system.
+
 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
index 95e1f9a..465da2b 100644 (file)
@@ -1431,7 +1431,7 @@ implementation defined).
 
 The implementation defined policy @code{Statement_Assertions}
 applies to @code{Assert}, @code{Assert_And_Cut},
-@code{Assume}, and @code{Loop_Invariant}.
+@code{Assume}, @code{Loop_Invariant}, and @code{Loop_Variant}.
 
 @node Pragma Assume
 @unnumberedsec Pragma Assume
index ebb6843..e678c8b 100644 (file)
@@ -1,4 +1,4 @@
-------------------------------------------------------------------------------
+-----------------------------------------------------------------------------
 --                                                                          --
 --                         GNAT COMPILER COMPONENTS                         --
 --                                                                          --
@@ -21903,14 +21903,14 @@ package body Sem_Prag is
 
             procedure Collect_Abstract_States (States : Elist_Id) is
                State_Elmt : Elmt_Id;
-
             begin
-               State_Elmt := First_Elmt (States);
-               while Present (State_Elmt) loop
-                  Add_Item (Node (State_Elmt), Hidden_States);
-
-                  Next_Elmt (State_Elmt);
-               end loop;
+               if Present (States) then
+                  State_Elmt := First_Elmt (States);
+                  while Present (State_Elmt) loop
+                     Add_Item (Node (State_Elmt), Hidden_States);
+                     Next_Elmt (State_Elmt);
+                  end loop;
+               end if;
             end Collect_Abstract_States;
 
             --  Local variables
@@ -22147,7 +22147,8 @@ package body Sem_Prag is
                         and then Nam_In (Nam, Name_Assert,
                                               Name_Assert_And_Cut,
                                               Name_Assume,
-                                              Name_Loop_Invariant))
+                                              Name_Loop_Invariant,
+                                              Name_Loop_Variant))
             then
                case (Chars (Get_Pragma_Arg (Last (PPA)))) is
                   when Name_On | Name_Check =>
@@ -22207,10 +22208,11 @@ package body Sem_Prag is
             if Ename = Pnm
               or else Pnm = Name_Assertion
               or else (Pnm = Name_Statement_Assertions
-                        and then (Ename = Name_Assert         or else
-                                  Ename = Name_Assert_And_Cut or else
-                                  Ename = Name_Assume         or else
-                                  Ename = Name_Loop_Invariant))
+                        and then Nam_In (Ename, Name_Assert,
+                                                Name_Assert_And_Cut,
+                                                Name_Assume,
+                                                Name_Loop_Invariant,
+                                                Name_Loop_Variant))
             then
                Policy := Chars (Get_Pragma_Arg (Last (PPA)));
 
index 58c51c0..9f42707 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                          C Implementation File                           *
  *                                                                          *
- *         Copyright (C) 1992-2012, Free Software Foundation, Inc.          *
+ *         Copyright (C) 1992-2013, 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- *
 #endif
 #include "selectLib.h"
 #include "vxWorks.h"
+#if defined (__RTP__)
+# include "version.h"
+# if (_WRS_VXWORKS_MAJOR == 6)
+#  include "vwModNum.h"
+# endif /* _WRS_VXWORKS_MAJOR == 6 */
+#endif /* __RTP__ */
 #endif
 
 #ifdef __ANDROID__
@@ -920,11 +926,16 @@ __gnat_is_file_not_found_error (int errno_val) {
 #if ! defined (__RTP__) && (! defined (VTHREADS) || defined (__VXWORKSMILS__))
       case S_nfsLib_NFSERR_NOENT:
 #endif
+#if defined (__RTP__) && (_WRS_VXWORKS_MAJOR == 6)
+       /* An RTP can return an NFS file not found, and the NFS bits must
+          first be masked off to check the errno.  */
+      case M_nfsStat | ENOENT:
+#endif
 #endif
          return 1;
 
       default:
-         return 0;
+        return 0;
    }
 }