[Ada] Fix spurious errors on ghost code in generics
authorYannick Moy <moy@adacore.com>
Mon, 16 May 2022 07:58:18 +0000 (09:58 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 2 Jun 2022 09:06:42 +0000 (09:06 +0000)
commit017f48682c2498b4cde79cf6a1c2e09b6ad51e02
tree874fb70a66dab0ac3beb4f86647ab39857d985f1
parenta9f5f2cd642689ae58f27aa23dff5c8d7c7bb016
[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.
gcc/ada/atree.adb