If a constrained subtype is given when a deferred constant is declared, then the subtype given in the completion is required (at compile time) to be subject to a statically matching constraint. This rule was not properly enforced in some cases and constructs that should have been rejected were incorrectly accepted. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch3.adb (Check_Possible_Deferred_Completion): Delete Prev_Obj_Def formal parameter. Reorganize code so that statically matching check is also performed in the case where the subtype given in the initial declaration is constrained and the subtype given in the completion is not.