[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 24 Jan 2014 11:42:21 +0000 (12:42 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 24 Jan 2014 11:42:21 +0000 (12:42 +0100)
2014-01-24  Robert Dewar  <dewar@adacore.com>

* sem_prag.adb (Analyze_Input_Output): Add missing error check
for junk operand.
* sem_util.adb (Is_Refined_State): Add defense against junk
tree from error.

2014-01-24  Pascal Obry  <obry@adacore.com>

* projects.texi: Removes Build_Slaves attribute documentation.

From-SVN: r207027

gcc/ada/ChangeLog
gcc/ada/projects.texi
gcc/ada/sem_prag.adb
gcc/ada/sem_util.adb

index 4b3c213..b553c17 100644 (file)
@@ -1,3 +1,14 @@
+2014-01-24  Robert Dewar  <dewar@adacore.com>
+
+       * sem_prag.adb (Analyze_Input_Output): Add missing error check
+       for junk operand.
+       * sem_util.adb (Is_Refined_State): Add defense against junk
+       tree from error.
+
+2014-01-24  Pascal Obry  <obry@adacore.com>
+
+       * projects.texi: Removes Build_Slaves attribute documentation.
+
 2014-01-23  Robert Dewar  <dewar@adacore.com>
 
        * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
index 0236ba2..bb06787 100644 (file)
@@ -4963,10 +4963,7 @@ invoking @code{gnatpp} for the source.
 
 @itemize @bullet
 
-@item @b{Build_Slaves}: list
 
-Value is the list of machine names that are to be used in distributed
-compilation.
 
 @item @b{Root_Dir}: single
 
index cffae57..15679a4 100644 (file)
@@ -783,9 +783,9 @@ package body Sem_Prag is
 
                Item_Id := Entity_Of (Item);
 
-               Record_Possible_Body_Reference (Item, Item_Id);
-
                if Present (Item_Id) then
+                  Record_Possible_Body_Reference (Item, Item_Id);
+
                   if Ekind_In (Item_Id, E_Abstract_State,
                                         E_In_Parameter,
                                         E_In_Out_Parameter,
index 9a8428d..dc6a495 100644 (file)
@@ -3723,6 +3723,12 @@ package body Sem_Util is
          else
             Item_Id := Entity_Of (Item);
 
+            --  Defend against junk
+
+            if No (Item_Id) then
+               return False;
+            end if;
+
             return
               Ekind (Item_Id) = E_Abstract_State
                 and then Has_Visible_Refinement (Item_Id);