]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Spurious unreferenced warning on selected component
authorJustin Squirek <squirek@adacore.com>
Mon, 12 Feb 2024 15:50:24 +0000 (15:50 +0000)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 14 May 2024 08:19:53 +0000 (10:19 +0200)
commit416e572edb0cbc84081de5a1932be7a2138a529a
tree63d35c6c88bcbbc3a3ab3ac4e2dcd4b51ec0ca7a
parentf545412378592e3c4b420b61867bfd3dda2f6480
ada: Spurious unreferenced warning on selected component

This patch fixes an error in the compiler whereby a selected component on the
left hand side of an assignment statement may not get marked as referenced -
leading to spurious unreferenced warnings on such objects.

gcc/ada/

* sem_util.adb (Set_Referenced_Modified): Use Original_Node to
avoid recursive calls on expanded / internal objects such that
source nodes get appropriately marked as referenced.
gcc/ada/sem_util.adb