ada: Compiler fails on unchecked deallocation for constrained protected subtype

The compiler fails with an error or Assert_Failure when calling
an instantiation of Unchecked_Deallocation that has been instantiated
with a constrained subtype of a discriminated protected type.

gcc/ada/ChangeLog:

	* sem_ch3.adb (Constrain_Corresponding_Record): Inherit Class_Wide_Type on the
	created constrained subtype.
1 file changed