[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Tue, 29 Jul 2014 14:53:10 +0000 (16:53 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 29 Jul 2014 14:53:10 +0000 (16:53 +0200)
2014-07-29  Vincent Celier  <celier@adacore.com>

* frontend.adb: Add dependency on gnat.adc when taken into account
and on non-temporary configuration pragmas files specified in
switches -gnatec.
* prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
dependencies on configuration pragmas files.

2014-07-29  Pat Rogers  <rogers@adacore.com>

* gnat_ugn.texi: Minor clarification to the explanation for the
GNATtest -v switch.

From-SVN: r213204

gcc/ada/ChangeLog
gcc/ada/frontend.adb
gcc/ada/gnat_ugn.texi
gcc/ada/prepcomp.adb
gcc/ada/prepcomp.ads

index 0a45f087259fcdacf259fc531ebd1cab700e89bf..7f36e12d715991fbfdc82a165e8456aa81127dc1 100644 (file)
@@ -1,3 +1,16 @@
+2014-07-29  Vincent Celier  <celier@adacore.com>
+
+       * frontend.adb: Add dependency on gnat.adc when taken into account
+       and on non-temporary configuration pragmas files specified in
+       switches -gnatec.
+       * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
+       dependencies on configuration pragmas files.
+
+2014-07-29  Pat Rogers  <rogers@adacore.com>
+
+       * gnat_ugn.texi: Minor clarification to the explanation for the
+       GNATtest -v switch.
+
 2014-07-29  Robert Dewar  <dewar@adacore.com>
 
        * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
index 24b33cfe2096f7ef29b53cb8f7d0d0bba794c526..8d59e6ceeee4f99df3caa54f918d5de0e799ce67 100644 (file)
@@ -144,6 +144,8 @@ begin
 
       Prag : Node_Id;
 
+      Temp_File : Boolean;
+
    begin
       --  We always analyze config files with style checks off, since
       --  we don't want a miscellaneous gnat.adc that is around to
@@ -167,6 +169,7 @@ begin
          if Source_gnat_adc /= No_Source_File then
             Initialize_Scanner (No_Unit, Source_gnat_adc);
             Config_Pragmas := Par (Configuration_Pragmas => True);
+            Prepcomp.Add_Dependency (Source_gnat_adc);
          else
             Config_Pragmas := Empty_List;
          end if;
@@ -196,12 +199,22 @@ begin
          for Index in Opt.Config_File_Names'Range loop
             Name_Len := Config_File_Names (Index)'Length;
             Name_Buffer (1 .. Name_Len) := Config_File_Names (Index).all;
+            Temp_File :=
+              Name_Len > 4
+              and then
+                (Name_Buffer (Name_Len - 3 .. Name_Len) = ".TMP"
+                 or else
+                 Name_Buffer (Name_Len - 3 .. Name_Len) = ".tmp");
+
             Source_Config_File := Load_Config_File (Name_Enter);
 
             if Source_Config_File = No_Source_File then
                Osint.Fail
                  ("cannot find configuration pragmas file "
                   & Config_File_Names (Index).all);
+
+            elsif not Temp_File then
+               Prepcomp.Add_Dependency (Source_Config_File);
             end if;
 
             Initialize_Scanner (No_Unit, Source_Config_File);
index 2dcdb4f35a24af9e8cf4510523872d79d2cf6870..3b0394062ea45822bf9d1b4fbc33863ead1c37df 100644 (file)
@@ -10968,7 +10968,7 @@ in the loop.  Consider for example the procedure:
 @noindent
 By default, the compiler cannot unconditionally vectorize the loop because
 assigning to a component of the array designated by R in one iteration could
-change the value read from the components of the arrays designated by X or Y
+change the value read from the components of the array designated by X or Y
 in a later iteration.  As a result, the compiler will generate two versions
 of the loop in the object code, one vectorized and the other not vectorized,
 as well as a test to select the appropriate version at run time.  This can
@@ -19834,7 +19834,9 @@ Suppresses noncritical output messages.
 
 @item -v
 @cindex @option{-v} (@command{gnattest})
-Verbose mode: generates version information.
+Verbose mode: generates version information if specified by itself on the
+command line.  If specified via GNATtest_Switches, produces output
+about the execution of the tool.
 
 @item --validate-type-extensions
 @cindex @option{--validate-type-extensions} (@command{gnattest})
index 2cc1c5e684f6a7c2c52dd1013f006fec2e4acfca..737ebf25e51f1b71fd3c098fe7259f16f6de1c38 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2003-2012, Free Software Foundation, Inc.         --
+--          Copyright (C) 2003-2014, 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- --
@@ -34,7 +34,6 @@ with Scn;      use Scn;
 with Sinput.L; use Sinput.L;
 with Stringt;  use Stringt;
 with Table;
-with Types;    use Types;
 
 package body Prepcomp is
 
@@ -137,6 +136,16 @@ package body Prepcomp is
       end loop;
    end Add_Command_Line_Symbols;
 
+   --------------------
+   -- Add_Dependency --
+   --------------------
+
+   procedure Add_Dependency (S : Source_File_Index) is
+   begin
+      Dependencies.Increment_Last;
+      Dependencies.Table (Dependencies.Last) := S;
+   end Add_Dependency;
+
    ----------------------
    -- Add_Dependencies --
    ----------------------
@@ -543,9 +552,7 @@ package body Prepcomp is
 
       --  Record the dependency on the preprocessor data file
 
-      Dependencies.Increment_Last;
-      Dependencies.Table (Dependencies.Last) :=
-        Source_Index_Of_Preproc_Data_File;
+      Add_Dependency (Source_Index_Of_Preproc_Data_File);
    end Parse_Preprocessing_Data_File;
 
    ---------------------------
@@ -676,8 +683,7 @@ package body Prepcomp is
             end loop;
 
             if Add_Deffile then
-               Dependencies.Increment_Last;
-               Dependencies.Table (Dependencies.Last) := Deffile;
+               Add_Dependency (Deffile);
             end if;
          end;
 
index 00ddf13d2d7756dcf66c6e6eef1b91328902370d..ea132ffea4c6d3bb773b99a0bce7396bafe46b4f 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2002-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2002-2014, 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- --
 --  This package stores all preprocessing data for the compiler
 
 with Namet; use Namet;
+with Types; use Types;
 
 package Prepcomp is
 
+   procedure Add_Dependency (S : Source_File_Index);
+   --  Add a dependency on a non-source file.
+   --  This is used internally for the preprocessing data file and the
+   --  preprocessing definition file, and also externally for non-temporary
+   --  configuration pragmas files.
+
    procedure Add_Dependencies;
    --  Add dependencies on the preprocessing data file and the preprocessing
-   --  definition files, if any.
+   --  definition files, if any, and the non-temporary configuration pragmas
+   --  files, if any.
 
    procedure Check_Symbols;
    --  Check if there are preprocessing symbols on the command line and set