From: Yannick Moy Date: Mon, 21 May 2018 14:50:59 +0000 (+0000) Subject: [Ada] Spurious error in inlining for GNATprove on prefix call notation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e3822b0aae8c0756929e31c61330e941b17c8eb2;p=gcc.git [Ada] Spurious error in inlining for GNATprove on prefix call notation During the special inlining done in GNATprove mode, a call in prefix notation leads to a spurious error. Now fixed. 2018-05-21 Yannick Moy gcc/ada/ * sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix call notation in inlined call in GNATprove mode. From-SVN: r260454 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 71ef1ba346e..f7f92af4377 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-04-04 Yannick Moy + + * sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix + call notation in inlined call in GNATprove mode. + 2018-05-21 Hristian Kirtchev * einfo.adb (Is_External_State): An abstract state is also external diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index e621ac3cb89..e33492057ea 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -1933,7 +1933,9 @@ package body Sem_Ch6 is begin if Is_Tagged_Type (Typ) and then Present (First_Formal (Subp)) - and then Etype (First_Formal (Subp)) = Typ + and then (Etype (First_Formal (Subp)) = Typ + or else + Class_Wide_Type (Etype (First_Formal (Subp))) = Typ) and then Try_Object_Operation (P) then return;