diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-10 10:01:57 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-10 10:01:57 +0000 |
commit | 90a07d4c781688cf52abd70c1097b11b651a6702 (patch) | |
tree | 6719a6bc87fb9426192a2ee4239fcbe3d1a71fde /gcc/ada | |
parent | ae35d473dcba37da6805652727c83a7f7699eae6 (diff) | |
download | gcc-90a07d4c781688cf52abd70c1097b11b651a6702.tar.gz |
2010-09-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Derive_Subprograms): An interface primitive operation
that is a renaming must be derived like any other primitive operation,
the renamed operation is not relevant to the derivation.
2010-09-10 Robert Dewar <dewar@adacore.com>
* sem_aux.ads: Add comment for Is_Inherently_Limited_Type.
* checks.adb: Minor reformatting.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164155 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/ada/checks.adb | 6 | ||||
-rwxr-xr-x | gcc/ada/sem_aux.ads | 3 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 8 |
4 files changed, 24 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 13d20301ba6..d6a96deac3a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,14 @@ +2010-09-10 Ed Schonberg <schonberg@adacore.com> + + * sem_ch3.adb (Derive_Subprograms): An interface primitive operation + that is a renaming must be derived like any other primitive operation, + the renamed operation is not relevant to the derivation. + +2010-09-10 Robert Dewar <dewar@adacore.com> + + * sem_aux.ads: Add comment for Is_Inherently_Limited_Type. + * checks.adb: Minor reformatting. + 2010-09-10 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Add section on intent of style checking options. diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 9b10f126256..7448168566c 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -4108,9 +4108,9 @@ package body Checks is end if; end if; - -- If this is a boolean expression, only its elementary consituents - -- need checking: if they are valid, a boolean or short-circuit - -- operation with them will be valid as well. + -- If this is a boolean expression, only its elementary consituents need + -- checking: if they are valid, a boolean or short-circuit operation + -- with them will be valid as well. if Base_Type (Typ) = Standard_Boolean and then diff --git a/gcc/ada/sem_aux.ads b/gcc/ada/sem_aux.ads index 8b763e05240..490f8e3d5d4 100755 --- a/gcc/ada/sem_aux.ads +++ b/gcc/ada/sem_aux.ads @@ -172,7 +172,8 @@ package Sem_Aux is -- These are the types that are defined as return-by-reference types in Ada -- 95 (see RM95-6.5(11-16)). In Ada 2005, these are the types that require -- build-in-place for function calls. Note that build-in-place is allowed - -- for other types, too. + -- for other types, too. This is also used for idenfitying pure procedures + -- whose calls should not be eliminated (RM 10.2.1(18/2)). function Is_Limited_Type (Ent : Entity_Id) return Boolean; -- Ent is any entity. Returns true if Ent is a limited type (limited diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index c39e93936e5..709ad218b63 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -12966,8 +12966,16 @@ package body Sem_Ch3 is -- were not covered by the parent type. We exclude here null -- interface primitives because they do not need special -- management. + -- We also exclude interface operations that are renamings. + -- If the subprogram is an explicit renaming of an interface + -- primitive, it is a regular primitive operation, and the + -- presence of its alias is not relevant: it has to be derived + -- like any other primitive. elsif Present (Alias (Subp)) + and then + Nkind (Unit_Declaration_Node (Subp)) + /= N_Subprogram_Renaming_Declaration and then Is_Interface (Find_Dispatching_Type (Alias_Subp)) and then not (Nkind (Parent (Alias_Subp)) = N_Procedure_Specification |