[Ada] Fix aliasing check for actual parameters passed by reference

Pierre-Marie de Rodat derodat@adacore.com
Wed Jun 16 08:43:56 GMT 2021


The aliasing check applies when some of the formals has their passing
mechanism unspecified; RM 6.2 (12/3). Previously it only applied when
the first formal had its passing mechanism unspecified and the second
had its passing mechanism either unspecified or by-reference.

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

gcc/ada/

	* checks.adb (Apply_Scalar_Range_Check): Fix handling of check depending
	on the parameter passing mechanism.  Grammar adjustment ("has"
	=> "have").
	(Parameter_Passing_Mechanism_Specified): Add a hyphen in a comment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 4031 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210616/d4c1ca12/attachment-0001.bin>


More information about the Gcc-patches mailing list