aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-01-06 11:33:32 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2015-01-06 11:33:32 +0100
commitbb6c60f4c6f9ead08315e4de6d71320d1af7a16d (patch)
treeae626a6e4bdccd3b3367b5ee5a7bb567b184f726 /gcc
parent3dfe4883e7b0dec116a927968f8fe60500f03c35 (diff)
downloadgcc-bb6c60f4c6f9ead08315e4de6d71320d1af7a16d.zip
gcc-bb6c60f4c6f9ead08315e4de6d71320d1af7a16d.tar.gz
gcc-bb6c60f4c6f9ead08315e4de6d71320d1af7a16d.tar.bz2
[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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog34
-rw-r--r--gcc/ada/freeze.adb4
-rw-r--r--gcc/ada/i-cpoint.adb25
-rw-r--r--gcc/ada/prj-attr.adb2
-rw-r--r--gcc/ada/prj-conf.adb5
-rw-r--r--gcc/ada/projects.texi19
-rw-r--r--gcc/ada/sem_ch12.adb34
-rw-r--r--gcc/ada/snames.ads-tmpl1
8 files changed, 104 insertions, 20 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 19d6eb0..861d0c8 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,37 @@
+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>
* bindgen.adb: Minor style fix.
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 7ac51e8..a2fcddc 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -4200,9 +4200,11 @@ package body Freeze is
-- generates the right visibility, and that is exactly what the
-- 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));
+ Set_From_Aspect_Specification (Iprag, False);
-- Fix up spec to be not imported any more
diff --git a/gcc/ada/i-cpoint.adb b/gcc/ada/i-cpoint.adb
index b26391a..0f17bb2 100644
--- a/gcc/ada/i-cpoint.adb
+++ b/gcc/ada/i-cpoint.adb
@@ -6,7 +6,7 @@
-- --
-- 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 --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -102,19 +102,34 @@ package body Interfaces.C.Pointers is
Target : Pointer;
Length : ptrdiff_t)
is
- T : Pointer := Target;
- S : Pointer := Source;
+ T : Pointer;
+ S : Pointer;
begin
- if S = null or else T = null then
+ if Source = null or else Target = null then
raise Dereference_Error;
- else
+ elsif To_Addr (Target) <= To_Addr (Source) then
+ -- Forward copy
+ T := Target;
+ S := Source;
+
for J in 1 .. Length loop
T.all := S.all;
Increment (T);
Increment (S);
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 Copy_Array;
diff --git a/gcc/ada/prj-attr.adb b/gcc/ada/prj-attr.adb
index 7fb5e92..7bc5b23 100644
--- a/gcc/ada/prj-attr.adb
+++ b/gcc/ada/prj-attr.adb
@@ -369,6 +369,8 @@ package body Prj.Attr is
"SVproject_subdir#" &
"SVactive#" &
"LAartifacts#" &
+ "SVmode#" &
+ "SVinstall_name#" &
-- package Remote
diff --git a/gcc/ada/prj-conf.adb b/gcc/ada/prj-conf.adb
index 4ab035d..a3b92f8 100644
--- a/gcc/ada/prj-conf.adb
+++ b/gcc/ada/prj-conf.adb
@@ -633,8 +633,9 @@ package body Prj.Conf is
else
if Tgt_Name /= No_Name then
Raise_Invalid_Config
- ("invalid target name """
- & Get_Name_String (Tgt_Name) & """ in configuration");
+ ("mismatched targets: """
+ & Get_Name_String (Tgt_Name) & """ in configuration, """
+ & Target & """ specified");
else
Raise_Invalid_Config
("no target specified in configuration file");
diff --git a/gcc/ada/projects.texi b/gcc/ada/projects.texi
index 5ff2abc..aa12e5b 100644
--- a/gcc/ada/projects.texi
+++ b/gcc/ada/projects.texi
@@ -1095,6 +1095,16 @@ installed. Default is @b{include}.
Subdirectory of @b{Prefix} where the generated project file is to be
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
@c ---------------------------------------------
@@ -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
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
@node Package Linker Attributes
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index e454ffe..53b626e 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -3318,12 +3318,13 @@ package body Sem_Ch12 is
Is_Actual_Pack : constant Boolean :=
Is_Internal (Defining_Entity (N));
- Env_Installed : Boolean := False;
- Parent_Installed : Boolean := False;
- Renaming_List : List_Id;
- Unit_Renaming : Node_Id;
- Needs_Body : Boolean;
- Inline_Now : Boolean := False;
+ Env_Installed : Boolean := False;
+ Parent_Installed : Boolean := False;
+ Renaming_List : List_Id;
+ Unit_Renaming : Node_Id;
+ Needs_Body : Boolean;
+ Inline_Now : Boolean := False;
+ Has_Inline_Always : Boolean := False;
Save_IPSM : constant Boolean := Ignore_Pragma_SPARK_Mode;
-- Save flag Ignore_Pragma_SPARK_Mode for restore on exit
@@ -3371,6 +3372,12 @@ package body Sem_Ch12 is
E := First_Entity (Gen_Unit);
while Present (E) loop
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;
end if;
@@ -3706,8 +3713,9 @@ package body Sem_Ch12 is
end loop;
end if;
- -- If front-end inlining is enabled, and this is a unit for which
- -- code will be generated, we instantiate the body at once.
+ -- If front-end inlining is enabled or there are any subprograms
+ -- 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
-- generic is not a child unit of another generic, to avoid scope
@@ -3720,7 +3728,7 @@ package body Sem_Ch12 is
and then not Is_Actual_Pack
then
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)
or else In_Main_Context (Current_Scope))
and then Nkind (Parent (N)) /= N_Compilation_Unit
@@ -3775,10 +3783,12 @@ package body Sem_Ch12 is
or else (Operating_Mode = Check_Semantics
and then (ASIS_Mode or GNATprove_Mode)));
- -- If front_end_inlining is enabled, do not instantiate body if
- -- within a generic context.
+ -- If front-end inlining is enabled or there are any subprograms
+ -- 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))
then
Needs_Body := False;
diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl
index 673a753..3c86c9c 100644
--- a/gcc/ada/snames.ads-tmpl
+++ b/gcc/ada/snames.ads-tmpl
@@ -1286,6 +1286,7 @@ package Snames is
Name_Include_Path_File : constant Name_Id := N + $;
Name_Inherit_Source_Path : constant Name_Id := N + $;
Name_Install : constant Name_Id := N + $;
+ Name_Install_Name : constant Name_Id := N + $;
Name_Languages : constant Name_Id := N + $;
Name_Language_Kind : constant Name_Id := N + $;
Name_Leading_Library_Options : constant Name_Id := N + $;