https://gcc.gnu.org/g:1a8ad4ab97d048c30106e2f007c0c280635ce2e1

commit r16-9925-g1a8ad4ab97d048c30106e2f007c0c280635ce2e1
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 d11e18a099dc..fc0764e49767 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -10304,6 +10304,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