[Ada] Fix validity checks on attribute 'Old prefix

Pierre-Marie de Rodat derodat@adacore.com
Fri Jun 19 08:28:33 GMT 2020


Validity checks for 'Old prefixes (enabled by the -gnatVo switch) are
now executed when the 'Old prefix is evaluated, i.e. at the very
beginning of a subprogram and not when evaluating the postcondition.

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

2020-06-19  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* exp_attr.adb (Expand_N_Attribute_Reference): Call Ensure_Valid
	on the expression of an object declaration that captures the
	value of 'Old prefix.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2045 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200619/dabea87e/attachment-0001.bin>


More information about the Gcc-patches mailing list