Commit 6f76a257 by Arnaud Charlet

[multiple changes]

2010-06-17  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch6.adb (Expand_Call): Do not expand a call to an internal
	protected operation if the subprogram has been eliminated.

2010-06-17  Vincent Celier  <celier@adacore.com>

	* prj-nmsc.adb (Check_Library_Attributes): Allow the different
	directories associated with a library to be any directory when the
	library project is externally built.

2010-06-17  Vincent Celier  <celier@adacore.com>

	* make.adb (Check): If switch -m is used, deallocate the memory that
	may be allocated when computing the checksum.

From-SVN: r160907
parent cfab0c49
2010-06-17 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Call): Do not expand a call to an internal
protected operation if the subprogram has been eliminated.
2010-06-17 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Check_Library_Attributes): Allow the different
directories associated with a library to be any directory when the
library project is externally built.
2010-06-17 Vincent Celier <celier@adacore.com>
* make.adb (Check): If switch -m is used, deallocate the memory that
may be allocated when computing the checksum.
2010-06-17 Eric Botcazou <ebotcazou@adacore.com> 2010-06-17 Eric Botcazou <ebotcazou@adacore.com>
* g-socthi-mingw.adb (C_Recvmsg): Add 'use type' clause for C.size_t; * g-socthi-mingw.adb (C_Recvmsg): Add 'use type' clause for C.size_t;
......
...@@ -3095,12 +3095,14 @@ package body Exp_Ch6 is ...@@ -3095,12 +3095,14 @@ package body Exp_Ch6 is
-- In Ada 2005, this may be an indirect call to an access parameter that -- In Ada 2005, this may be an indirect call to an access parameter that
-- is an access_to_subprogram. In that case the anonymous type has a -- is an access_to_subprogram. In that case the anonymous type has a
-- scope that is a protected operation, but the call is a regular one. -- scope that is a protected operation, but the call is a regular one.
-- In either case do not expand call if subprogram is eliminated.
Scop := Scope (Subp); Scop := Scope (Subp);
if Nkind (N) /= N_Entry_Call_Statement if Nkind (N) /= N_Entry_Call_Statement
and then Is_Protected_Type (Scop) and then Is_Protected_Type (Scop)
and then Ekind (Subp) /= E_Subprogram_Type and then Ekind (Subp) /= E_Subprogram_Type
and then not Is_Eliminated (Subp)
then then
-- If the call is an internal one, it is rewritten as a call to the -- If the call is an internal one, it is rewritten as a call to the
-- corresponding unprotected subprogram. -- corresponding unprotected subprogram.
......
...@@ -1785,6 +1785,13 @@ package body Make is ...@@ -1785,6 +1785,13 @@ package body Make is
Modified_Source := Time_Stamp_Mismatch (ALI, Read_Only); Modified_Source := Time_Stamp_Mismatch (ALI, Read_Only);
-- To avoid using too much memory when switch -m is used, free the
-- memory allocated for the source file when computing the checksum.
if Minimal_Recompilation then
Sinput.P.Clear_Source_File_Table;
end if;
if Modified_Source /= No_File then if Modified_Source /= No_File then
ALI := No_ALI_Id; ALI := No_ALI_Id;
......
...@@ -3631,10 +3631,12 @@ package body Prj.Nmsc is ...@@ -3631,10 +3631,12 @@ package body Prj.Nmsc is
"library directory { does not exist", "library directory { does not exist",
Lib_Dir.Location, Project); Lib_Dir.Location, Project);
elsif not Project.Externally_Built then
-- The library directory cannot be the same as the Object -- The library directory cannot be the same as the Object
-- directory. -- directory.
elsif Project.Library_Dir.Name = Project.Object_Directory.Name then if Project.Library_Dir.Name = Project.Object_Directory.Name then
Error_Msg Error_Msg
(Data.Flags, (Data.Flags,
"library directory cannot be the same " & "library directory cannot be the same " &
...@@ -3675,8 +3677,8 @@ package body Prj.Nmsc is ...@@ -3675,8 +3677,8 @@ package body Prj.Nmsc is
if OK then if OK then
-- The library directory cannot be the same as a source -- The library directory cannot be the same as a
-- directory of another project either. -- source directory of another project either.
Pid := Data.Tree.Projects; Pid := Data.Tree.Projects;
Project_Loop : loop Project_Loop : loop
...@@ -3695,12 +3697,13 @@ package body Prj.Nmsc is ...@@ -3695,12 +3697,13 @@ package body Prj.Nmsc is
then then
Err_Vars.Error_Msg_File_1 := Err_Vars.Error_Msg_File_1 :=
File_Name_Type (Dir_Elem.Value); File_Name_Type (Dir_Elem.Value);
Err_Vars.Error_Msg_Name_1 := Pid.Project.Name; Err_Vars.Error_Msg_Name_1 :=
Pid.Project.Name;
Error_Msg Error_Msg
(Data.Flags, (Data.Flags,
"library directory cannot be the same " & "library directory cannot be the same" &
"as source directory { of project %%", " as source directory { of project %%",
Lib_Dir.Location, Project); Lib_Dir.Location, Project);
OK := False; OK := False;
exit Project_Loop; exit Project_Loop;
...@@ -3726,6 +3729,7 @@ package body Prj.Nmsc is ...@@ -3726,6 +3729,7 @@ package body Prj.Nmsc is
end; end;
end if; end if;
end if; end if;
end if;
end if; end if;
...@@ -3811,8 +3815,9 @@ package body Prj.Nmsc is ...@@ -3811,8 +3815,9 @@ package body Prj.Nmsc is
Lib_ALI_Dir.Location, Project); Lib_ALI_Dir.Location, Project);
end if; end if;
if Project.Library_ALI_Dir /= Project.Library_Dir then if (not Project.Externally_Built) and then
Project.Library_ALI_Dir /= Project.Library_Dir
then
-- The library ALI directory cannot be the same as the -- The library ALI directory cannot be the same as the
-- Object directory. -- Object directory.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment