]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Avoid failing reanalysis of aggregate bounds
authorSteve Baird <baird@adacore.com>
Tue, 3 Dec 2024 00:45:37 +0000 (16:45 -0800)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 3 Jan 2025 15:39:11 +0000 (16:39 +0100)
An expression like Some_Package."+" (Arg1, Arg2) is sometimes transformed
during expansion into an unqualified call of the form "+" (Arg1, Arg2).
This is normally ok, but it means that reanalysis of the expression is likely
to fail and must therefore be avoided. Remove code that was forcing such
reanalysis (the original reason for the now-removed code is unknown).

gcc/ada/ChangeLog:

* exp_aggr.adb (Check_Bounds): Remove calls that were setting the
Analyzed flag to False for two aggregate bound expressions.

gcc/ada/exp_aggr.adb

index 1f1f58061cee12e8cd123dbdf91bdcc7adaf8f9f..64bb05c9b4c1984958491cd420edfde38a21e57d 100644 (file)
@@ -5144,8 +5144,6 @@ package body Exp_Aggr is
 
                 Right_Opnd => Cond);
 
-            Set_Analyzed (Left_Opnd  (Left_Opnd (Cond)), False);
-            Set_Analyzed (Right_Opnd (Left_Opnd (Cond)), False);
             Insert_Action (N,
               Make_Raise_Constraint_Error (Loc,
                 Condition => Cond,