OSDN Git Service

* sem_ch6.adb (Analyze_Subprogram_Body): Recognize additional
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 15 Dec 2002 16:18:20 +0000 (16:18 +0000)
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 15 Dec 2002 16:18:20 +0000 (16:18 +0000)
        case of a body created for a Renaming_As_Body, on which
        conformance checks are not performed. Fixes PR ada/5690.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60158 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/sem_ch6.adb

index e5d0586..ed23cf9 100644 (file)
@@ -1,3 +1,9 @@
+2002-12-14   Geert Bosch <bosch@gnat.com>
+
+       * sem_ch6.adb (Analyze_Subprogram_Body): Recognize additional 
+        case of a body created for a Renaming_As_Body, on which 
+        conformance checks are not performed. Fixes PR ada/5690.
+
 2002-11-18  Nathanael Nerode  <neroden@gcc.gnu.org>
        * adaint.c (__gnat_tmp_name): Better, but good enough for now,
        solution to buffer overflow bug on GNU/Linux.   
index efdb154..650f19c 100644 (file)
@@ -1056,9 +1056,15 @@ package body Sem_Ch6 is
             --  and the test can lead to spurious errors on nested defaults.
 
             if Present (Spec_Decl)
-              and then Nkind (Original_Node (Spec_Decl)) =
-                N_Subprogram_Renaming_Declaration
               and then not Comes_From_Source (N)
+
+              and then
+                (Nkind (Original_Node (Spec_Decl)) =
+                 N_Subprogram_Renaming_Declaration
+
+                or else (Present (Corresponding_Body (Spec_Decl))
+                  and then Nkind
+                   (Unit_Declaration_Node (Corresponding_Body (Spec_Decl))) = +                      N_Subprogram_Renaming_Declaration))
             then
                Conformant := True;
             else