https://gcc.gnu.org/g:0c059c67acbf3ba6df55a27e7276b4640898e3bd

commit r17-879-g0c059c67acbf3ba6df55a27e7276b4640898e3bd
Author: Eric Botcazou <[email protected]>
Date:   Tue Mar 3 11:35:36 2026 +0100

    ada: Fix unresolved symbols with partial -gnatVo compilation
    
    This happens when the units of a program using the standard containers are
    not uniformly compiled with the -gnatVo switch.  This is the fallout of an
    internal confusion as to what validity checks must be applied to.
    
    gcc/ada/ChangeLog:
    
            * exp_ch4.adb (Expand_N_Op_Eq): Do not expand an array comparison
            for validity checking purposes when the component type is covered
            by the suppression of validity checks.

Diff:
---
 gcc/ada/exp_ch4.adb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 533e2f0d7542..9a77084f5241 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -8582,6 +8582,8 @@ package body Exp_Ch4 is
 
          if Validity_Check_Operands
            and then not Is_Known_Valid (Component_Type (Typl))
+           and then not
+             Is_Check_Suppressed (Component_Type (Typl), Validity_Check)
          then
             declare
                Save_Force_Validity_Checks : constant Boolean :=

Reply via email to