]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Tune recent change for warning about unsupported overlays
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 5 Mar 2025 10:19:22 +0000 (11:19 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 9 Jun 2025 06:32:08 +0000 (08:32 +0200)
commit7f31b28fe199e35a9f19cf1b15e632880a6d7706
tree8c5992e0c7b063fccfbdaafb51ffc3d856462fad
parent108e346ced2a5589b90577f25c9559a61ae95eb9
ada: Tune recent change for warning about unsupported overlays

Fix crash occurring when overlay applies to protected component and expansion
is disabled, e.g. because of semantic checking mode (switch -gnatc) or because
the compiler is running in GNATprove mode.

Also, simply pick the type of overlaid object from the attribute prefix itself.

gcc/ada/ChangeLog:

* sem_util.adb (Find_Overlaid_Entity): Don't call Etype on empty Ent;
tune style; move computation of Overl_Typ out of the loop.
gcc/ada/sem_util.adb