[Ada] Minor cleanup in Expand_Call_Helper

Pierre-Marie de Rodat derodat@adacore.com
Thu Jun 18 09:13:20 GMT 2020


This makes a couple of changes in the code dealing with a call to a
derived subprogram: first, it removes useless calls to Relocate_Node
before calls to OK_Convert_To and Unchecked_Convert_To (these functions
already call Relocate_Node on their second operand) and merge calls to
Analyze and Resolve; second, it removes the generation of a potential
range check for the actual against the formal's type of the derived
subprogram after the conversion (and thus a potential range check)
to the formal's type of the parent subprogram, which does not seem
to serve any useful purpose.

No functional changes.

Tested on x86_64-pc-linux-gnu, committed on trunk

2020-06-18  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* exp_ch6.adb (Expand_Call_Helper): Remove superfluous calls
	to Relocate_Node and merge calls to Analyze and Resolve in a
	couple of places.  Do not attempt to generate a range check
	for an actual parameter against the formal's type of a derived
	subprogram after generating a conversion to the formal's type
	of the parent subprogram.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2399 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200618/373d81fb/attachment.bin>


More information about the Gcc-patches mailing list