[Ada] Spurious visibility error on Declare_Expression with renames

Pierre-Marie de Rodat derodat@adacore.com
Fri Oct 16 07:35:39 GMT 2020


The compiler rejects a declare expression whose declarations are only
object renaming declarations, when the expression references those
local objects.

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

gcc/ada/

	* sem_res.adb (Resolve_Declare_Expression): Retrieve the created
	block entity that is the scope of the local declarations, from
	either a local object declaration or an object renaming
	declaration. The block entity does not have an explicit
	declaration, but appears as the scope of all locally declared
	objects.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 758 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201016/8e28ef6b/attachment-0001.bin>


More information about the Gcc-patches mailing list