In GNATprove mode we are don't want predicate failure to pollute the
predicate expression extracted from the predicate function.
gcc/ada/
* sem_ch13.adb (Build_Predicate_Function): Ignore predicate
failure in GNATprove mode.
Second_Formal : constant Entity_Id :=
Next_Entity (Object_Entity);
begin
- if Present (PF_Expr) then
+ -- In GNATprove mode we are only interested in the predicate
+ -- expression itself and don't want a raise expression that
+ -- comes from the Predicate_Failure.
+
+ if Present (PF_Expr)
+ and then not GNATprove_Mode
+ then
pragma Assert (Present (Second_Formal));
-- This is an ugly hack to cope with an ugly situation.