[Ada] Patch for ada/5690

Geert Bosch bosch@gnat.com
Sun Dec 15 18:55:00 GMT 2002


Fix for ada/5690

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.

Index: sem_ch6.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/sem_ch6.adb,v
retrieving revision 1.5
diff -c -r1.5 sem_ch6.adb
*** sem_ch6.adb	23 Oct 2002 07:33:32 -0000	1.5
--- sem_ch6.adb	15 Dec 2002 02:09:55 -0000
***************
*** 1056,1064 ****
               --  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)
               then
                  Conformant := True;
               else
--- 1056,1070 ----
               --  and the test can lead to spurious errors on nested 
defaults.

               if Present (Spec_Decl)
                 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



More information about the Gcc-patches mailing list