From: Arnaud Charlet Date: Tue, 29 Jul 2014 14:53:10 +0000 (+0200) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5ae243127908fa14634e086d2e55b8a996f95a2c;p=gcc.git [multiple changes] 2014-07-29 Vincent Celier * 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 * gnat_ugn.texi: Minor clarification to the explanation for the GNATtest -v switch. From-SVN: r213204 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 0a45f087259..7f36e12d715 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,16 @@ +2014-07-29 Vincent Celier + + * 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 + + * gnat_ugn.texi: Minor clarification to the explanation for the + GNATtest -v switch. + 2014-07-29 Robert Dewar * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with diff --git a/gcc/ada/frontend.adb b/gcc/ada/frontend.adb index 24b33cfe209..8d59e6ceeee 100644 --- a/gcc/ada/frontend.adb +++ b/gcc/ada/frontend.adb @@ -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); diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 2dcdb4f35a2..3b0394062ea 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -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}) diff --git a/gcc/ada/prepcomp.adb b/gcc/ada/prepcomp.adb index 2cc1c5e684f..737ebf25e51 100644 --- a/gcc/ada/prepcomp.adb +++ b/gcc/ada/prepcomp.adb @@ -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; diff --git a/gcc/ada/prepcomp.ads b/gcc/ada/prepcomp.ads index 00ddf13d2d7..ea132ffea4c 100644 --- a/gcc/ada/prepcomp.ads +++ b/gcc/ada/prepcomp.ads @@ -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- -- @@ -26,12 +26,20 @@ -- 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