aboutsummaryrefslogtreecommitdiff
path: root/zlib
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2022-12-22 23:36:47 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-15 11:36:40 +0200
commitf04dae641112509bfd4ec8bd76774ebedca28d1f (patch)
treed70658ca852e08542c5c881a169815fe1f5ae42a /zlib
parente90791e5a02b021d22ffb4c36673b9af623e2063 (diff)
downloadgcc-f04dae641112509bfd4ec8bd76774ebedca28d1f.zip
gcc-f04dae641112509bfd4ec8bd76774ebedca28d1f.tar.gz
gcc-f04dae641112509bfd4ec8bd76774ebedca28d1f.tar.bz2
ada: Fix link to parent when copying with Copy_Separate_Tree
When flag More_Ids is set on a node, then syntactic children will have their Parent link set to the last node in the chain of Mode_Ids. For example, parameter associations in declaration like: procedure P (X, Y : T); will have More_Ids set for "X", Prev_Ids set on "Y" and both will have the same node of "T" as their child. However, "T" will have only one parent, i.e. "Y". This anomaly was taken into account in New_Copy_Tree, but not in Copy_Separate_Tree. This was leading to spurious errors in check for ghost-correctness applied to copied specs. gcc/ada/ * atree.ads (Is_Syntactic_Node): Refactored from New_Copy_Tree. * atree.adb (Is_Syntactic_Node): Likewise. (Copy_Separate_Tree): Use Is_Syntactic_Node. * sem_util.adb (Has_More_Ids): Move to Atree. (Is_Syntactic_Node): Likewise.
Diffstat (limited to 'zlib')
0 files changed, 0 insertions, 0 deletions