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

commit r17-4600-gf5c0cda82b6aa48c66b9ca9e997beebc22a7770d
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 cf603b5a21f2..1bea0d6a600b 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -10322,6 +10322,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