public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-944] [Ada] Fix spurious errors on ghost code in generics
@ 2022-06-02 9:10 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-06-02 9:10 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:017f48682c2498b4cde79cf6a1c2e09b6ad51e02
commit r13-944-g017f48682c2498b4cde79cf6a1c2e09b6ad51e02
Author: Yannick Moy <moy@adacore.com>
Date: Mon May 16 09:58:18 2022 +0200
[Ada] Fix spurious errors on ghost code in generics
After the recent fix for detecting illegal use of ghost entities in
code, spurious errors could be raised on generic code with ghost, due to
wrong setting of the ghost flags on copied entities from the generic to
the instantiation.
gcc/ada/
* atree.adb (New_Copy): Reset flags related to ghost entities
before marking the new node.
Diff:
---
gcc/ada/atree.adb | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb
index a949761085e..2d7962c96b1 100644
--- a/gcc/ada/atree.adb
+++ b/gcc/ada/atree.adb
@@ -1775,6 +1775,11 @@ package body Atree is
-- Mark the copy as Ghost depending on the current Ghost region
+ if Nkind (New_Id) in N_Entity then
+ Set_Is_Checked_Ghost_Entity (New_Id, False);
+ Set_Is_Ignored_Ghost_Entity (New_Id, False);
+ end if;
+
Mark_New_Ghost_Node (New_Id);
New_Node_Debugging_Output (New_Id);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-02 9:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02 9:10 [gcc r13-944] [Ada] Fix spurious errors on ghost code in generics 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).