https://gcc.gnu.org/g:b5b8192f010006cb6cd69c34b3578839360edcb0

commit r14-12999-gb5b8192f010006cb6cd69c34b3578839360edcb0
Author: Eric Botcazou <[email protected]>
Date:   Wed Sep 23 11:12:20 2026 +0200

    Ada: Fix crash during resolution of membership test in generic unit
    
    This just adds a missing guard.
    
    gcc/ada/
            * sem_res.adb (Resolve_Membership_Op): Add guard for generic type
            to the test on the RM size.

Diff:
---
 gcc/ada/sem_res.adb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index b8483bce6b61..fa0114a3c4c9 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -10110,6 +10110,7 @@ package body Sem_Res is
         and then (Is_Overloaded (R)
                    or else
                      (not Is_Universal_Numeric_Type (Etype (R))
+                       and then not Is_Generic_Type (Etype (R))
                        and then
                          (not Is_Integer_Type (Etype (R))
                            or else

Reply via email to