public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1678] [Ada] Skip overlay checks on protected components with expansion disabled
@ 2021-06-21 11:05 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-06-21 11:05 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b1955e0e6dbcc376c8a05ea51751dcce7e210266
commit r12-1678-gb1955e0e6dbcc376c8a05ea51751dcce7e210266
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Fri Mar 26 09:02:33 2021 +0100
[Ada] Skip overlay checks on protected components with expansion disabled
gcc/ada/
* sem_util.adb (Find_Overlaid_Entity): Ignore references to
components and discriminants.
Diff:
---
gcc/ada/sem_util.adb | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index b59116e540b..2e102b93497 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -9437,6 +9437,18 @@ package body Sem_Util is
if Is_Entity_Name (Expr) then
Ent := Entity (Expr);
+
+ -- If expansion is disabled, then we might see an entity of a
+ -- protected component or of a discriminant of a concurrent unit.
+ -- Ignore such entities, because further warnings for overlays
+ -- expect this routine to only collect entities of entire objects.
+
+ if Ekind (Ent) in E_Component | E_Discriminant then
+ pragma Assert
+ (not Expander_Active
+ and then Is_Concurrent_Type (Scope (Ent)));
+ Ent := Empty;
+ end if;
return;
-- Check for components
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-21 11:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 11:05 [gcc r12-1678] [Ada] Skip overlay checks on protected components with expansion disabled Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).