During the special inlining done in GNATprove mode, a call in prefix
notation leads to a spurious error. Now fixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
2018-05-21 Yannick Moy <m...@adacore.com>
gcc/ada/
* sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
call notation in inlined call in GNATprove mode.
--- gcc/ada/sem_ch6.adb
+++ 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;