ada: Fix bogus visibility error for inherited operator of null extension

This occurs when the operator has a heterogeneous profile and the extension
is declared in the same scope as the type of a non-controlling parameter of
the operator, because Find_Dispatching_Type incorrectly returns this type.

gcc/ada/ChangeLog:

	* exp_ch3.adb (Make_Controlling_Function_Wrappers): Manually set the
	Has_Controlling_Result flag on the wrappers.
	* sem_disp.ads (Override_Dispatching_Operation): Move to...
	* sem_disp.adb (Override_Dispatching_Operation): ...here.
	(Find_Dispatching_Type): Return the (controlling) result type for a
	controlling function wrapper.
3 files changed