[Ada] Link failure with call to expression function in precondition

Pierre-Marie de Rodat derodat@adacore.com
Mon Jun 15 08:05:22 GMT 2020


A call to an exprewion function generated for a precondition that
applies to a null procedure leaves the freeze node for the expression
function in the wrong context. As a result the body of the function is
not properly compiled and the corresponding symbol is markea as
undefined, leading to a subsequent link error.

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

2020-06-15  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* freeze.adb (Freeze_Expression): When traversing the tree
	looking for the proper insertion point for the freeze node of an
	entity that is declared in an outer scope, set the candidate
	subprogram body node properly.  Previous code has an off-by-one
	error.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 694 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200615/62894765/attachment.bin>


More information about the Gcc-patches mailing list