diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e5d0586de54..ed23cf931b8 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2002-12-14 Geert Bosch + + * 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 * adaint.c (__gnat_tmp_name): Better, but good enough for now, solution to buffer overflow bug on GNU/Linux. diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index efdb1548897..650f19cbc6c 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -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