From e3822b0aae8c0756929e31c61330e941b17c8eb2 Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Mon, 21 May 2018 14:50:59 +0000 Subject: [PATCH] [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 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/sem_ch6.adb | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 71ef1ba..f7f92af 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 e621ac3..e334920 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; -- 2.7.4