ada: Fix freezing of nested discriminated type

Simply creating the freeze node for the base type of a discriminated type
without adjusting the scope and the visible declarations leads to an
incorrect tree that crashes the compiler when unnesting the predicate
function.

gcc/ada/ChangeLog:

	* sem_ch3.adb (Find_Type_Of_Object): Adjust freezing of the base
	type of a discriminated type.

Co-authored-by: Eric Botcazou <botcazou@adacore.com>
1 file changed