]> gcc.gnu.org Git - gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 10 Sep 2010 10:01:57 +0000 (12:01 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 10 Sep 2010 10:01:57 +0000 (12:01 +0200)
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.

From-SVN: r164155

gcc/ada/ChangeLog
gcc/ada/checks.adb
gcc/ada/sem_aux.ads
gcc/ada/sem_ch3.adb

index 13d20301ba606c73d35c9cc310cf5fc92c3dd6dc..d6a96deac3ab3963fb35e6551bae3f5e7ee1ce2b 100644 (file)
@@ -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.
index 9b10f12625606c182702c6048ded71266ab4b6be..7448168566cb7dcc4efbad67967d106995ca446f 100644 (file)
@@ -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
index 8b763e052402720356f5193aaa297f56685f00ad..490f8e3d5d45cab86d81b5051f787d46f3c12ce8 100755 (executable)
@@ -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
index c39e93936e55d0e3123b46a9a7c0df62a3a3be95..709ad218b631680b811ec5c3fe609427234ceeb2 100644 (file)
@@ -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
This page took 0.102109 seconds and 5 git commands to generate.