[Ada] Spurious error in inlining for GNATprove on prefix call notation
authorYannick Moy <moy@adacore.com>
Mon, 21 May 2018 14:50:59 +0000 (14:50 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 21 May 2018 14:50:59 +0000 (14:50 +0000)
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  <moy@adacore.com>

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
gcc/ada/sem_ch6.adb

index 71ef1ba346e028755591f67df9c33ec982064405..f7f92af4377542e54e1acd3a69e2802454e51fe1 100644 (file)
@@ -1,3 +1,8 @@
+2018-04-04  Yannick Moy  <moy@adacore.com>
+
+       * sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
+       call notation in inlined call in GNATprove mode.
+
 2018-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
 
        * einfo.adb (Is_External_State): An abstract state is also external
index e621ac3cb89d02af8e017b0786592db021172a13..e33492057eafb230af49a415b0b1a0052d7f7b3d 100644 (file)
@@ -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;