aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-10-31 12:07:40 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-10-31 12:07:40 +0100
commit88f7d2d148c34dbf76f5cb4321ced56d5253a96f (patch)
treeca986f32417901a45ead7bde59ab21ff989c70ec
parent1335a8caf760e49d687866541cda051bd9651289 (diff)
downloadgcc-88f7d2d148c34dbf76f5cb4321ced56d5253a96f.zip
gcc-88f7d2d148c34dbf76f5cb4321ced56d5253a96f.tar.gz
gcc-88f7d2d148c34dbf76f5cb4321ced56d5253a96f.tar.bz2
[multiple changes]
2014-10-31 Eric Botcazou <ebotcazou@adacore.com> * sem_ch6.adb: Remove obsolete comment. 2014-10-31 Olivier Hainque <hainque@adacore.com> * g-allein.ads: bind vec_sld for pixels to 8hi vsldoi instead of 4si, as pixels are short. 2014-10-31 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Call): Do not reject a call to a protected operation in the spec of a protected type, when the call appears in a pre/postcondition for another protected operation. 2014-10-31 Tristan Gingold <gingold@adacore.com> * prj-conf.adb: Locate_Runtime: Always search the runtime in project path. 2014-10-31 Eric Botcazou <ebotcazou@adacore.com> * inline.adb (Check_Package_Body_For_Inlining): Adjust previous change to use correct idiom for back-end inlining. From-SVN: r216958
-rw-r--r--gcc/ada/ChangeLog25
-rw-r--r--gcc/ada/g-allein.ads4
-rw-r--r--gcc/ada/inline.adb8
-rw-r--r--gcc/ada/prj-conf.adb36
-rw-r--r--gcc/ada/sem_ch6.adb3
-rw-r--r--gcc/ada/sem_res.adb4
6 files changed, 50 insertions, 30 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 7b9be96..eb8949c 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,28 @@
+2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
+
+ * sem_ch6.adb: Remove obsolete comment.
+
+2014-10-31 Olivier Hainque <hainque@adacore.com>
+
+ * g-allein.ads: bind vec_sld for pixels to 8hi vsldoi instead
+ of 4si, as pixels are short.
+
+2014-10-31 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_res.adb (Resolve_Call): Do not reject a call to a protected
+ operation in the spec of a protected type, when the call appears
+ in a pre/postcondition for another protected operation.
+
+2014-10-31 Tristan Gingold <gingold@adacore.com>
+
+ * prj-conf.adb: Locate_Runtime: Always search the runtime in
+ project path.
+
+2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
+
+ * inline.adb (Check_Package_Body_For_Inlining): Adjust previous
+ change to use correct idiom for back-end inlining.
+
2014-10-31 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_Record_Type): Do not check component size
diff --git a/gcc/ada/g-allein.ads b/gcc/ada/g-allein.ads
index 8007630..1346fdd 100644
--- a/gcc/ada/g-allein.ads
+++ b/gcc/ada/g-allein.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-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- --
@@ -830,7 +830,7 @@ package GNAT.Altivec.Low_Level_Interface is
C : c_int) return vector_pixel;
pragma Import
- (LL_Altivec, vec_sld_vx_vx_cint_r_vx, "__builtin_altivec_vsldoi_4si");
+ (LL_Altivec, vec_sld_vx_vx_cint_r_vx, "__builtin_altivec_vsldoi_8hi");
function vec_sld_vsc_vsc_cint_r_vsc
(A : vector_signed_char;
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index 0b94277..c06e5cb 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -1981,7 +1981,9 @@ package body Inline is
OK : Boolean;
begin
- if Front_End_Inlining
+ -- Legacy implementation (relying on frontend inlining)
+
+ if not Back_End_Inlining
and then Is_Compilation_Unit (P)
and then not Is_Generic_Instance (P)
then
@@ -1989,7 +1991,9 @@ package body Inline is
E := First_Entity (P);
while Present (E) loop
- if Has_Pragma_Inline (E) then
+ if Has_Pragma_Inline_Always (E)
+ or else (Has_Pragma_Inline (E) and Front_End_Inlining)
+ then
if not Is_Loaded (Bname) then
Load_Needed_Body (N, OK);
diff --git a/gcc/ada/prj-conf.adb b/gcc/ada/prj-conf.adb
index 53d29ac..b88f1a1 100644
--- a/gcc/ada/prj-conf.adb
+++ b/gcc/ada/prj-conf.adb
@@ -26,7 +26,6 @@
with Makeutl; use Makeutl;
with MLib.Tgt;
with Opt; use Opt;
-with Osint; use Osint;
with Output; use Output;
with Prj.Env;
with Prj.Err;
@@ -1553,28 +1552,24 @@ package body Prj.Conf is
(Language : Name_Id;
Env : Prj.Tree.Environment)
is
- function Is_Base_Name (Path : String) return Boolean;
- -- Returns True if Path has no directory separator
+ function Is_RTS_Directory (Path : String) return Boolean;
+ -- Returns True if Path is a directory for a runtime. This simply check
+ -- that Path has a "adalib" subdirectoy, which is a property for
+ -- runtimes on the project path.
- ------------------
- -- Is_Base_Name --
- ------------------
+ ----------------------
+ -- Is_RTS_Directory --
+ ----------------------
- function Is_Base_Name (Path : String) return Boolean is
+ function Is_RTS_Directory (Path : String) return Boolean is
begin
- for J in Path'Range loop
- if Is_Directory_Separator (Path (J)) then
- return False;
- end if;
- end loop;
-
- return True;
- end Is_Base_Name;
+ return Is_Directory (Path & Directory_Separator & "adalib");
+ end Is_RTS_Directory;
-- Local declarations
function Find_Rts_In_Path is new Prj.Env.Find_Name_In_Path
- (Check_Filename => Is_Directory);
+ (Check_Filename => Is_RTS_Directory);
RTS_Name : constant String := Runtime_Name_For (Language);
@@ -1583,14 +1578,9 @@ package body Prj.Conf is
-- Start of processing for Locate_Runtime
begin
- if not Is_Base_Name (RTS_Name) then
- Full_Path :=
- Find_Rts_In_Path (Env.Project_Path, RTS_Name);
-
- if Full_Path = null then
- Raise_Invalid_Config ("cannot find RTS " & RTS_Name);
- end if;
+ Full_Path := Find_Rts_In_Path (Env.Project_Path, RTS_Name);
+ if Full_Path /= null then
Set_Runtime_For (Language, Normalize_Pathname (Full_Path.all));
Free (Full_Path);
end if;
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 6f28cbf..27e2706 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -3595,8 +3595,7 @@ package body Sem_Ch6 is
Build_Body_To_Inline (N, Spec_Id);
end if;
- -- New implementation (relying on backend inlining). Enabled by
- -- debug flag gnatd.z for testing
+ -- New implementation (relying on backend inlining)
else
if Has_Pragma_Inline_Always (Spec_Id)
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index c8869d7..31dfe5f 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -6022,11 +6022,13 @@ package body Sem_Res is
end if;
-- A protected function cannot be called within the definition of the
- -- enclosing protected type.
+ -- enclosing protected type, unless it is part of a pre/postcondition
+ -- on another protected operation.
if Is_Protected_Type (Scope (Nam))
and then In_Open_Scopes (Scope (Nam))
and then not Has_Completion (Scope (Nam))
+ and then not In_Spec_Expression
then
Error_Msg_NE
("& cannot be called before end of protected definition", N, Nam);