aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorYannick Moy <moy@adacore.com>2018-05-21 14:50:59 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-05-21 14:50:59 +0000
commite3822b0aae8c0756929e31c61330e941b17c8eb2 (patch)
treeb570a649c5151a1ba44a8bdbc8e464a1079c4fa1 /gcc
parentbcc093dc813c77d15a8d99ce063a45fa01c7ed73 (diff)
downloadgcc-e3822b0aae8c0756929e31c61330e941b17c8eb2.zip
gcc-e3822b0aae8c0756929e31c61330e941b17c8eb2.tar.gz
gcc-e3822b0aae8c0756929e31c61330e941b17c8eb2.tar.bz2
[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 <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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/sem_ch6.adb4
2 files changed, 8 insertions, 1 deletions
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 <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
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;