2018-12-11 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_ch4.adb (Analyze_Allocator): In GNATprove mode build a
subtype declaration if the allocator has a subtype indication
with a constraint. This allows additional proofs to be applied
to allocators that designate uninitialized constrained objects.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266991
138bc75d-0d04-0410-961f-
82ee72b054a4
+2018-12-11 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch4.adb (Analyze_Allocator): In GNATprove mode build a
+ subtype declaration if the allocator has a subtype indication
+ with a constraint. This allows additional proofs to be applied
+ to allocators that designate uninitialized constrained objects.
+
2018-12-11 Yannick Moy <moy@adacore.com>
* sem_util.adb (Has_Full_Default_Initialization): Consider
-- being called. The caller will have verified that the object is legal
-- for the call. If the remaining parameters match, the first parameter
-- will rewritten as a dereference if needed, prior to completing analysis.
-
procedure Check_Misspelled_Selector
(Prefix : Entity_Id;
Sel : Node_Id);
return;
end if;
- if Expander_Active then
+ -- In GNATprove mode we need to preserve the link between
+ -- the original subtype indication and the anonymous subtype,
+ -- to extend proofs to constrained acccess types.
+
+ if Expander_Active or else GNATprove_Mode then
Def_Id := Make_Temporary (Loc, 'S');
Insert_Action (E,