diff options
author | Ed Schonberg <schonberg@adacore.com> | 2021-01-24 13:18:28 -0500 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-07 05:28:51 -0400 |
commit | 9f0d76eca6b9f9b9d451e889dad28f22885fd1a3 (patch) | |
tree | e633bbd556ab763ecfaa130ef7b9e0978a30920c | |
parent | 92f372f00936a549de2cb9764eee722bb07959ba (diff) | |
download | gcc-9f0d76eca6b9f9b9d451e889dad28f22885fd1a3.zip gcc-9f0d76eca6b9f9b9d451e889dad28f22885fd1a3.tar.gz gcc-9f0d76eca6b9f9b9d451e889dad28f22885fd1a3.tar.bz2 |
[Ada] Spurious error on protected call in inherited postcondition
gcc/ada/
* exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
Add guard to verify that the enclosing pragma is a precondition.
-rw-r--r-- | gcc/ada/exp_util.adb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 2955fd7..30e1aff 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -1327,6 +1327,7 @@ package body Exp_Util is and then Is_Primitive_Wrapper (New_E) and then Is_Primitive_Wrapper (Subp) and then Scope (Subp) = Scope (New_E) + and then Chars (Pragma_Identifier (Prag)) = Name_Precondition then Error_Msg_Node_2 := Wrapped_Entity (Subp); Error_Msg_NE |