]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Decouple compile-time evaluation from while loop source locations
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 20 Oct 2025 10:09:07 +0000 (12:09 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 3 Nov 2025 14:15:18 +0000 (15:15 +0100)
commitefa7ec80d97eb7b3f2b13a5d50dd8603983eee72
tree43e389290fc35a81c1d90dd8e8f5a4eddd7f2944
parent48d09de92b0a5f0008ffb20ca876a42096471878
ada: Decouple compile-time evaluation from while loop source locations

The compile-time evaluation relied on source locations to decide whether a
variable reference occurs within a WHILE loop where the evaluation can
assume the loop condition. Now this relies exclusively on the AST structure.

gcc/ada/ChangeLog:

* exp_util.adb (Find_In_Enclosing_Context): Refactor from handling of
IF statements.
(Get_Current_Value_Condition): Reuse IF code for WHILE statements.
gcc/ada/exp_util.adb