]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix incorrect warning about unreferenced packed arrays
authorBob Duff <duff@adacore.com>
Mon, 12 Dec 2022 20:31:05 +0000 (15:31 -0500)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 5 Jan 2023 14:29:57 +0000 (15:29 +0100)
commit46924ad780665721a51306a646f7f601c359ba4c
treea4ea9c820d81bf9b1120dff93fc44d1655cd6d28
parenta24888388bab339cf8a8726ca67a0b4947a2d9ce
ada: Fix incorrect warning about unreferenced packed arrays

This patch fixes a bug in which a reference to a renaming of a
component of a packed array was not counted as a reference,
and thus caused incorrect warnings about unreferenced objects.

gcc/ada/

* sem_ch5.adb (Analyze_Assignment): Fix the bug by checking
Original_Node. The renaming might be elsewhere, but the (original)
reference is right here.
* errout.adb: Remove pragma Unreferenced which was added because
of the above bug.
* einfo.ads: Misc cleanup.
* lib.adb: Likewise.
* lib.ads: Likewise.
gcc/ada/einfo.ads
gcc/ada/errout.adb
gcc/ada/lib.adb
gcc/ada/lib.ads
gcc/ada/sem_ch5.adb