Commit 95eb8b69 by Arnaud Charlet

[multiple changes]

2011-08-03  Javier Miranda  <miranda@adacore.com>

	* exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
	Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.

2011-08-03  Bob Duff  <duff@adacore.com>

	* sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
	the Base_Type.

2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>

	* g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
	g-sehash.ads: Fix typo. Update header.

2011-08-03  Thomas Quinot  <quinot@adacore.com>

	* exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
	expansion.

2011-08-03  Gary Dismukes  <dismukes@adacore.com>

	* sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
	prefixes of private types along with records, since the selector may be
	a discriminant.
	* sem_res.adb (Resolve_Selected_Component): Consider prefixes of
	private types along with records, since the selector may be a
	discriminant.

From-SVN: r177259
parent 92e77027
2011-08-03 Javier Miranda <miranda@adacore.com>
* exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
2011-08-03 Bob Duff <duff@adacore.com>
* sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
the Base_Type.
2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
* g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
g-sehash.ads: Fix typo. Update header.
2011-08-03 Thomas Quinot <quinot@adacore.com>
* exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
expansion.
2011-08-03 Gary Dismukes <dismukes@adacore.com>
* sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
prefixes of private types along with records, since the selector may be
a discriminant.
* sem_res.adb (Resolve_Selected_Component): Consider prefixes of
private types along with records, since the selector may be a
discriminant.
2011-08-03 Emmanuel Briot <briot@adacore.com> 2011-08-03 Emmanuel Briot <briot@adacore.com>
* prj-pp.adb (Pretty_Print): remove trailing blank line in the file * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
......
...@@ -1472,9 +1472,7 @@ package body Exp_Ch6 is ...@@ -1472,9 +1472,7 @@ package body Exp_Ch6 is
-- functions that are treated as build-in-place to include other -- functions that are treated as build-in-place to include other
-- composite result types. -- composite result types.
if Ada_Version >= Ada_2005 if Is_Build_In_Place_Function_Call (Actual) then
and then Is_Build_In_Place_Function_Call (Actual)
then
Make_Build_In_Place_Call_In_Anonymous_Context (Actual); Make_Build_In_Place_Call_In_Anonymous_Context (Actual);
end if; end if;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2011, 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- --
...@@ -3561,6 +3561,18 @@ package body Exp_Util is ...@@ -3561,6 +3561,18 @@ package body Exp_Util is
end if; end if;
end Is_Volatile_Reference; end Is_Volatile_Reference;
--------------------------
-- Is_VM_By_Copy_Actual --
--------------------------
function Is_VM_By_Copy_Actual (N : Node_Id) return Boolean is
begin
return VM_Target /= No_VM
and then Nkind (N) = N_Identifier
and then Present (Renamed_Object (Entity (N)))
and then Nkind (Renamed_Object (Entity (N))) = N_Slice;
end Is_VM_By_Copy_Actual;
-------------------- --------------------
-- Kill_Dead_Code -- -- Kill_Dead_Code --
-------------------- --------------------
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2011, 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- --
...@@ -537,6 +537,10 @@ package Exp_Util is ...@@ -537,6 +537,10 @@ package Exp_Util is
-- or has Volatile_Components set. A slice of a volatile variable is -- or has Volatile_Components set. A slice of a volatile variable is
-- also volatile. -- also volatile.
function Is_VM_By_Copy_Actual (N : Node_Id) return Boolean;
-- Returns True if we are compiling on VM targets and N is a node that
-- requires to be passed by copy in these targets.
procedure Kill_Dead_Code (N : Node_Id; Warn : Boolean := False); procedure Kill_Dead_Code (N : Node_Id; Warn : Boolean := False);
-- N represents a node for a section of code that is known to be dead. Any -- N represents a node for a section of code that is known to be dead. Any
-- exception handler references and warning messages relating to this code -- exception handler references and warning messages relating to this code
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2002-2009, Free Software Foundation, Inc. -- -- Copyright (C) 2002-2011, 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- --
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2009-2010, Free Software Foundation, Inc. -- -- Copyright (C) 2009-2011, 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- --
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2009, Free Software Foundation, Inc. -- -- Copyright (C) 2009-2011, 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- --
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2009, Free Software Foundation, Inc. -- -- Copyright (C) 2009-2011, 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- --
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2009, Free Software Foundation, Inc. -- -- Copyright (C) 2009-2011, 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- --
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2009, Free Software Foundation, Inc. -- -- Copyright (C) 2009-2011, 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- --
......
...@@ -36,7 +36,6 @@ with Namet; use Namet; ...@@ -36,7 +36,6 @@ with Namet; use Namet;
with Sinfo; use Sinfo; with Sinfo; use Sinfo;
with Snames; use Snames; with Snames; use Snames;
with Stand; use Stand; with Stand; use Stand;
with Targparm; use Targparm;
package body Sem_Aux is package body Sem_Aux is
...@@ -785,18 +784,6 @@ package body Sem_Aux is ...@@ -785,18 +784,6 @@ package body Sem_Aux is
end if; end if;
end Is_Limited_Type; end Is_Limited_Type;
--------------------------
-- Is_VM_By_Copy_Actual --
--------------------------
function Is_VM_By_Copy_Actual (N : Node_Id) return Boolean is
begin
return VM_Target /= No_VM
and then Nkind (N) = N_Identifier
and then Present (Renamed_Object (Entity (N)))
and then Nkind (Renamed_Object (Entity (N))) = N_Slice;
end Is_VM_By_Copy_Actual;
---------------------- ----------------------
-- Nearest_Ancestor -- -- Nearest_Ancestor --
---------------------- ----------------------
......
...@@ -186,10 +186,6 @@ package Sem_Aux is ...@@ -186,10 +186,6 @@ package Sem_Aux is
-- composite containing a limited component, or a subtype of any of -- composite containing a limited component, or a subtype of any of
-- these types). -- these types).
function Is_VM_By_Copy_Actual (N : Node_Id) return Boolean;
-- Returns True if we are compiling on VM targets and N is a node that
-- requires to be passed by copy in these targets.
function Nearest_Ancestor (Typ : Entity_Id) return Entity_Id; function Nearest_Ancestor (Typ : Entity_Id) return Entity_Id;
-- Given a subtype Typ, this function finds out the nearest ancestor from -- Given a subtype Typ, this function finds out the nearest ancestor from
-- which constraints and predicates are inherited. There is no simple link -- which constraints and predicates are inherited. There is no simple link
......
...@@ -3127,7 +3127,10 @@ package body Sem_Ch4 is ...@@ -3127,7 +3127,10 @@ package body Sem_Ch4 is
T := It.Typ; T := It.Typ;
end if; end if;
if Is_Record_Type (T) then -- Locate the component. For a private prefix the selector can denote
-- a discriminant.
if Is_Record_Type (T) or else Is_Private_Type (T) then
-- If the prefix is a class-wide type, the visible components are -- If the prefix is a class-wide type, the visible components are
-- those of the base type. -- those of the base type.
......
...@@ -3639,11 +3639,9 @@ package body Sem_Ch8 is ...@@ -3639,11 +3639,9 @@ package body Sem_Ch8 is
(Op : Entity_Id; (Op : Entity_Id;
F : Entity_Id) return Boolean F : Entity_Id) return Boolean
is is
T : constant Entity_Id := Etype (F); T : constant Entity_Id := Base_Type (Etype (F));
begin begin
return (In_Use (T) return In_Use (T) and then Scope (T) = Scope (Op);
or else Present (Current_Use_Clause (Base_Type (T))))
and then Scope (T) = Scope (Op);
end Is_Primitive_Operator_In_Use; end Is_Primitive_Operator_In_Use;
-- Start of processing for End_Use_Package -- Start of processing for End_Use_Package
......
...@@ -8378,7 +8378,10 @@ package body Sem_Res is ...@@ -8378,7 +8378,10 @@ package body Sem_Res is
T := It.Typ; T := It.Typ;
end if; end if;
if Is_Record_Type (T) then -- Locate selected component. For a private prefix the selector
-- can denote a discriminant.
if Is_Record_Type (T) or else Is_Private_Type (T) then
-- The visible components of a class-wide type are those of -- The visible components of a class-wide type are those of
-- the root type. -- the root type.
......
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