Commit bb6c60f4 by Arnaud Charlet

[multiple changes]

2015-01-06  Vincent Celier  <celier@adacore.com>

	* prj-conf.adb (Check_Target): Improve error message when
	there are mismatched targets between the on in the configuration
	project file and the specified one, either in the main project
	file or in the --target= switch.

2015-01-06  Pascal Obry  <obry@adacore.com>

	* prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
	Install_Name attribute definitions.

2015-01-06  Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb (Wrap_Imported_Subprogram): Indicate that the
	generated Import pragma for the internal imported procedure does
	not come from an aspect, so that Is_Imported can be properly
	set for it.

2015-01-06  Gary Dismukes  <dismukes@adacore.com>

	* sem_ch12.adb (Might_Inline_Subp): Record whether
	any subprograms in the generic package are marked with
	pragma Inline_Always (setting flag Has_Inline_Always).
	(Analyze_Package_Instantiation): Add test of Has_Inline_Always
	alongside existing test of Front_End_Inlining as alternative
	conditions for setting Inline_Now. Also add test of
	Has_Inline_Always along with Front_End_Inlining test as an
	alternative condition for setting Needs_Body to False.

2015-01-06  Tristan Gingold  <gingold@adacore.com>

	* i-cpoint.adb (Copy_Array): Handle overlap.

From-SVN: r219253
parent 3dfe4883
2015-01-06 Vincent Celier <celier@adacore.com>
* prj-conf.adb (Check_Target): Improve error message when
there are mismatched targets between the on in the configuration
project file and the specified one, either in the main project
file or in the --target= switch.
2015-01-06 Pascal Obry <obry@adacore.com>
* prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
Install_Name attribute definitions.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Wrap_Imported_Subprogram): Indicate that the
generated Import pragma for the internal imported procedure does
not come from an aspect, so that Is_Imported can be properly
set for it.
2015-01-06 Gary Dismukes <dismukes@adacore.com>
* sem_ch12.adb (Might_Inline_Subp): Record whether
any subprograms in the generic package are marked with
pragma Inline_Always (setting flag Has_Inline_Always).
(Analyze_Package_Instantiation): Add test of Has_Inline_Always
alongside existing test of Front_End_Inlining as alternative
conditions for setting Inline_Now. Also add test of
Has_Inline_Always along with Front_End_Inlining test as an
alternative condition for setting Needs_Body to False.
2015-01-06 Tristan Gingold <gingold@adacore.com>
* i-cpoint.adb (Copy_Array): Handle overlap.
2015-01-06 Pascal Obry <obry@adacore.com> 2015-01-06 Pascal Obry <obry@adacore.com>
* bindgen.adb: Minor style fix. * bindgen.adb: Minor style fix.
......
...@@ -4200,9 +4200,11 @@ package body Freeze is ...@@ -4200,9 +4200,11 @@ package body Freeze is
-- generates the right visibility, and that is exactly what the -- generates the right visibility, and that is exactly what the
-- calls to Copy_Separate_Tree give us. -- calls to Copy_Separate_Tree give us.
-- Acquire copy of Inline pragma -- Acquire copy of Inline pragma, and indicate that it does not
-- come from an aspect, as it applies to an internal entity.
Iprag := Copy_Separate_Tree (Import_Pragma (E)); Iprag := Copy_Separate_Tree (Import_Pragma (E));
Set_From_Aspect_Specification (Iprag, False);
-- Fix up spec to be not imported any more -- Fix up spec to be not imported any more
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -102,19 +102,34 @@ package body Interfaces.C.Pointers is ...@@ -102,19 +102,34 @@ package body Interfaces.C.Pointers is
Target : Pointer; Target : Pointer;
Length : ptrdiff_t) Length : ptrdiff_t)
is is
T : Pointer := Target; T : Pointer;
S : Pointer := Source; S : Pointer;
begin begin
if S = null or else T = null then if Source = null or else Target = null then
raise Dereference_Error; raise Dereference_Error;
else elsif To_Addr (Target) <= To_Addr (Source) then
-- Forward copy
T := Target;
S := Source;
for J in 1 .. Length loop for J in 1 .. Length loop
T.all := S.all; T.all := S.all;
Increment (T); Increment (T);
Increment (S); Increment (S);
end loop; end loop;
else
-- Backward copy
T := Target + Length;
S := Source + Length;
for J in 1 .. Length loop
Decrement (T);
Decrement (S);
T.all := S.all;
end loop;
end if; end if;
end Copy_Array; end Copy_Array;
......
...@@ -369,6 +369,8 @@ package body Prj.Attr is ...@@ -369,6 +369,8 @@ package body Prj.Attr is
"SVproject_subdir#" & "SVproject_subdir#" &
"SVactive#" & "SVactive#" &
"LAartifacts#" & "LAartifacts#" &
"SVmode#" &
"SVinstall_name#" &
-- package Remote -- package Remote
......
...@@ -633,8 +633,9 @@ package body Prj.Conf is ...@@ -633,8 +633,9 @@ package body Prj.Conf is
else else
if Tgt_Name /= No_Name then if Tgt_Name /= No_Name then
Raise_Invalid_Config Raise_Invalid_Config
("invalid target name """ ("mismatched targets: """
& Get_Name_String (Tgt_Name) & """ in configuration"); & Get_Name_String (Tgt_Name) & """ in configuration, """
& Target & """ specified");
else else
Raise_Invalid_Config Raise_Invalid_Config
("no target specified in configuration file"); ("no target specified in configuration file");
......
...@@ -1095,6 +1095,16 @@ installed. Default is @b{include}. ...@@ -1095,6 +1095,16 @@ installed. Default is @b{include}.
Subdirectory of @b{Prefix} where the generated project file is to be Subdirectory of @b{Prefix} where the generated project file is to be
installed. Default is @b{share/gpr}. installed. Default is @b{share/gpr}.
@item @b{Mode}
The installation mode, it is either @b{dev} (default) or @b{usage}.
See @b{gprbuild} user's guide for details.
@item @b{Install_Name}
Specify the name to use for recording the installation. The default is
the project name without the extension.
@end table @end table
@c --------------------------------------------- @c ---------------------------------------------
...@@ -4818,6 +4828,15 @@ Indicates that the project is to be installed or not. Case-insensitive value ...@@ -4818,6 +4828,15 @@ Indicates that the project is to be installed or not. Case-insensitive value
"false" means that the project is not to be installed, all other values mean "false" means that the project is not to be installed, all other values mean
that the project is to be installed. that the project is to be installed.
@item @b{Mode}: single
Value is the installation mode, it is either @b{dev} (default) or @b{usage}.
@item @b{Install_Name}: single
Specify the name to use for recording the installation. The default is
the project name without the extension.
@end itemize @end itemize
@node Package Linker Attributes @node Package Linker Attributes
......
...@@ -3318,12 +3318,13 @@ package body Sem_Ch12 is ...@@ -3318,12 +3318,13 @@ package body Sem_Ch12 is
Is_Actual_Pack : constant Boolean := Is_Actual_Pack : constant Boolean :=
Is_Internal (Defining_Entity (N)); Is_Internal (Defining_Entity (N));
Env_Installed : Boolean := False; Env_Installed : Boolean := False;
Parent_Installed : Boolean := False; Parent_Installed : Boolean := False;
Renaming_List : List_Id; Renaming_List : List_Id;
Unit_Renaming : Node_Id; Unit_Renaming : Node_Id;
Needs_Body : Boolean; Needs_Body : Boolean;
Inline_Now : Boolean := False; Inline_Now : Boolean := False;
Has_Inline_Always : Boolean := False;
Save_IPSM : constant Boolean := Ignore_Pragma_SPARK_Mode; Save_IPSM : constant Boolean := Ignore_Pragma_SPARK_Mode;
-- Save flag Ignore_Pragma_SPARK_Mode for restore on exit -- Save flag Ignore_Pragma_SPARK_Mode for restore on exit
...@@ -3371,6 +3372,12 @@ package body Sem_Ch12 is ...@@ -3371,6 +3372,12 @@ package body Sem_Ch12 is
E := First_Entity (Gen_Unit); E := First_Entity (Gen_Unit);
while Present (E) loop while Present (E) loop
if Is_Subprogram (E) and then Is_Inlined (E) then if Is_Subprogram (E) and then Is_Inlined (E) then
-- Remember if there are any subprograms with Inline_Always
if Has_Pragma_Inline_Always (E) then
Has_Inline_Always := True;
end if;
return True; return True;
end if; end if;
...@@ -3706,8 +3713,9 @@ package body Sem_Ch12 is ...@@ -3706,8 +3713,9 @@ package body Sem_Ch12 is
end loop; end loop;
end if; end if;
-- If front-end inlining is enabled, and this is a unit for which -- If front-end inlining is enabled or there are any subprograms
-- code will be generated, we instantiate the body at once. -- marked with Inline_Always, and this is a unit for which code
-- will be generated, we instantiate the body at once.
-- This is done if the instance is not the main unit, and if the -- This is done if the instance is not the main unit, and if the
-- generic is not a child unit of another generic, to avoid scope -- generic is not a child unit of another generic, to avoid scope
...@@ -3720,7 +3728,7 @@ package body Sem_Ch12 is ...@@ -3720,7 +3728,7 @@ package body Sem_Ch12 is
and then not Is_Actual_Pack and then not Is_Actual_Pack
then then
if not Back_End_Inlining if not Back_End_Inlining
and then Front_End_Inlining and then (Front_End_Inlining or else Has_Inline_Always)
and then (Is_In_Main_Unit (N) and then (Is_In_Main_Unit (N)
or else In_Main_Context (Current_Scope)) or else In_Main_Context (Current_Scope))
and then Nkind (Parent (N)) /= N_Compilation_Unit and then Nkind (Parent (N)) /= N_Compilation_Unit
...@@ -3775,10 +3783,12 @@ package body Sem_Ch12 is ...@@ -3775,10 +3783,12 @@ package body Sem_Ch12 is
or else (Operating_Mode = Check_Semantics or else (Operating_Mode = Check_Semantics
and then (ASIS_Mode or GNATprove_Mode))); and then (ASIS_Mode or GNATprove_Mode)));
-- If front_end_inlining is enabled, do not instantiate body if -- If front-end inlining is enabled or there are any subprograms
-- within a generic context. -- marked with Inline_Always, do not instantiate body when within
-- a generic context.
if (Front_End_Inlining and then not Expander_Active) if ((Front_End_Inlining or else Has_Inline_Always)
and then not Expander_Active)
or else Is_Generic_Unit (Cunit_Entity (Main_Unit)) or else Is_Generic_Unit (Cunit_Entity (Main_Unit))
then then
Needs_Body := False; Needs_Body := False;
......
...@@ -1286,6 +1286,7 @@ package Snames is ...@@ -1286,6 +1286,7 @@ package Snames is
Name_Include_Path_File : constant Name_Id := N + $; Name_Include_Path_File : constant Name_Id := N + $;
Name_Inherit_Source_Path : constant Name_Id := N + $; Name_Inherit_Source_Path : constant Name_Id := N + $;
Name_Install : constant Name_Id := N + $; Name_Install : constant Name_Id := N + $;
Name_Install_Name : constant Name_Id := N + $;
Name_Languages : constant Name_Id := N + $; Name_Languages : constant Name_Id := N + $;
Name_Language_Kind : constant Name_Id := N + $; Name_Language_Kind : constant Name_Id := N + $;
Name_Leading_Library_Options : constant Name_Id := N + $; Name_Leading_Library_Options : constant Name_Id := N + $;
......
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