]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Preserve AST structure when copying tree with discrete types
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 17 Oct 2025 08:47:41 +0000 (10:47 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 3 Nov 2025 14:15:18 +0000 (15:15 +0100)
commit4d98d5e454ba93941445e0ab960167b6579db14a
treec2fb01fbe0bea4d56e97b1a39286eebb0c65511f
parent0c320ec602c1cc2d700925d0163539b18268fc60
ada: Preserve AST structure when copying tree with discrete types

When copying AST we created an orphaned copy of a scalar range. This was
confusing the compile-time evaluator, because we couldn't determine location of
a scalar range within an IF statement by looking at its parenthood chain.

gcc/ada/ChangeLog:

* sem_util.adb (Update_Semantic_Fields): Preserve tree structure when
copying scalar range of a discrete type.
gcc/ada/sem_util.adb