[Ada] Remove excessive validity checks on in-parameters

Pierre-Marie de Rodat derodat@adacore.com
Wed Jul 8 14:57:34 GMT 2020


Routine Safe_To_Capture_Value was written to capture just the "value",
which only made sense for assignable entities. However, it was later
employed to capture other properties, e.g. the value being [non-]null or
valid. Those properties can be captured for non-assignable entities as
well, e.g. constants and in-parameters (as is done here).

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

gcc/ada/

	* sem_util.ads, sem_util.adb (Safe_To_Capture_Value): Return
	True for in-parameters.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 3054 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200708/2879f98b/attachment-0001.bin>


More information about the Gcc-patches mailing list