diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-03 12:10:40 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-03 12:10:40 +0200 |
commit | 95eb8b69e6289ad1bc196915ba741f035817ce4b (patch) | |
tree | 26c7af0748202e6e8920fded388bf64f284d3c3c | |
parent | 92e770277f735559fae532ddcf7307d50e209b2f (diff) | |
download | gcc-95eb8b69e6289ad1bc196915ba741f035817ce4b.zip gcc-95eb8b69e6289ad1bc196915ba741f035817ce4b.tar.gz gcc-95eb8b69e6289ad1bc196915ba741f035817ce4b.tar.bz2 |
[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
-rw-r--r-- | gcc/ada/ChangeLog | 29 | ||||
-rw-r--r-- | gcc/ada/exp_ch6.adb | 4 | ||||
-rw-r--r-- | gcc/ada/exp_util.adb | 14 | ||||
-rw-r--r-- | gcc/ada/exp_util.ads | 6 | ||||
-rw-r--r-- | gcc/ada/g-sehash.ads | 2 | ||||
-rw-r--r-- | gcc/ada/g-sha1.ads | 2 | ||||
-rw-r--r-- | gcc/ada/g-sha224.ads | 2 | ||||
-rw-r--r-- | gcc/ada/g-sha256.ads | 2 | ||||
-rw-r--r-- | gcc/ada/g-sha384.ads | 2 | ||||
-rw-r--r-- | gcc/ada/g-sha512.ads | 2 | ||||
-rwxr-xr-x | gcc/ada/sem_aux.adb | 13 | ||||
-rwxr-xr-x | gcc/ada/sem_aux.ads | 4 | ||||
-rw-r--r-- | gcc/ada/sem_ch4.adb | 5 | ||||
-rw-r--r-- | gcc/ada/sem_ch8.adb | 6 | ||||
-rw-r--r-- | gcc/ada/sem_res.adb | 5 |
15 files changed, 64 insertions, 34 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 475fc11..a28897f 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,32 @@ +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> * prj-pp.adb (Pretty_Print): remove trailing blank line in the file diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index bf7b44e..d09261e 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -1472,9 +1472,7 @@ package body Exp_Ch6 is -- functions that are treated as build-in-place to include other -- composite result types. - if Ada_Version >= Ada_2005 - and then Is_Build_In_Place_Function_Call (Actual) - then + if Is_Build_In_Place_Function_Call (Actual) then Make_Build_In_Place_Call_In_Anonymous_Context (Actual); end if; diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 9a5eef0..9220837e 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -6,7 +6,7 @@ -- -- -- 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 -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -3561,6 +3561,18 @@ package body Exp_Util is end if; 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 -- -------------------- diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads index 5ef792b..4f13fa9 100644 --- a/gcc/ada/exp_util.ads +++ b/gcc/ada/exp_util.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -537,6 +537,10 @@ package Exp_Util is -- or has Volatile_Components set. A slice of a volatile variable is -- 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); -- 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 diff --git a/gcc/ada/g-sehash.ads b/gcc/ada/g-sehash.ads index 898f2ad..c3bbce1 100644 --- a/gcc/ada/g-sehash.ads +++ b/gcc/ada/g-sehash.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/g-sha1.ads b/gcc/ada/g-sha1.ads index c02589e..2a1c0e1 100644 --- a/gcc/ada/g-sha1.ads +++ b/gcc/ada/g-sha1.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/g-sha224.ads b/gcc/ada/g-sha224.ads index 4b81112..0520a5e 100644 --- a/gcc/ada/g-sha224.ads +++ b/gcc/ada/g-sha224.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/g-sha256.ads b/gcc/ada/g-sha256.ads index a638ff9..9108843 100644 --- a/gcc/ada/g-sha256.ads +++ b/gcc/ada/g-sha256.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/g-sha384.ads b/gcc/ada/g-sha384.ads index 7a63d7e..0047da0 100644 --- a/gcc/ada/g-sha384.ads +++ b/gcc/ada/g-sha384.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/g-sha512.ads b/gcc/ada/g-sha512.ads index 331db7d..e75d949 100644 --- a/gcc/ada/g-sha512.ads +++ b/gcc/ada/g-sha512.ads @@ -6,7 +6,7 @@ -- -- -- 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 -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/sem_aux.adb b/gcc/ada/sem_aux.adb index fd78fbf..0e5c3db 100755 --- a/gcc/ada/sem_aux.adb +++ b/gcc/ada/sem_aux.adb @@ -36,7 +36,6 @@ with Namet; use Namet; with Sinfo; use Sinfo; with Snames; use Snames; with Stand; use Stand; -with Targparm; use Targparm; package body Sem_Aux is @@ -785,18 +784,6 @@ package body Sem_Aux is end if; 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 -- ---------------------- diff --git a/gcc/ada/sem_aux.ads b/gcc/ada/sem_aux.ads index acf37e6..cf9af2e 100755 --- a/gcc/ada/sem_aux.ads +++ b/gcc/ada/sem_aux.ads @@ -186,10 +186,6 @@ package Sem_Aux is -- composite containing a limited component, or a subtype of any of -- 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; -- Given a subtype Typ, this function finds out the nearest ancestor from -- which constraints and predicates are inherited. There is no simple link diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 912e09b..664a080 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -3127,7 +3127,10 @@ package body Sem_Ch4 is T := It.Typ; 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 -- those of the base type. diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index e0e1e06..d02e911 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -3639,11 +3639,9 @@ package body Sem_Ch8 is (Op : Entity_Id; F : Entity_Id) return Boolean is - T : constant Entity_Id := Etype (F); + T : constant Entity_Id := Base_Type (Etype (F)); begin - return (In_Use (T) - or else Present (Current_Use_Clause (Base_Type (T)))) - and then Scope (T) = Scope (Op); + return In_Use (T) and then Scope (T) = Scope (Op); end Is_Primitive_Operator_In_Use; -- Start of processing for End_Use_Package diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index a5e2291..e88e551 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -8378,7 +8378,10 @@ package body Sem_Res is T := It.Typ; 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 root type. |