]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix assertion failure on error path
authorRonan Desplanques <desplanques@adacore.com>
Thu, 27 Feb 2025 14:45:01 +0000 (15:45 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 9 Jun 2025 06:32:02 +0000 (08:32 +0200)
gcc/ada/ChangeLog:

* sem_ch8.adb (Find_Selected_Component): Fix error path.

gcc/ada/sem_ch8.adb

index 4cd6b7d934029792de4a8f1b597d69d4e1b34d62..db892d0a5befea45c5e6f46a78d3f0f9f74a672a 100644 (file)
@@ -8419,6 +8419,7 @@ package body Sem_Ch8 is
                         if Found then
                            Error_Msg_N (
                               "prefix must be unique enclosing scope", N);
+                           Change_Selected_Component_To_Expanded_Name (N);
                            Set_Entity (N, Any_Id);
                            Set_Etype  (N, Any_Type);
                            return;