https://gcc.gnu.org/g:7aa4b1c5054f12c134e69ed295638885f4b3b9c1
commit r17-4581-g7aa4b1c5054f12c134e69ed295638885f4b3b9c1 Author: Eric Botcazou <[email protected]> Date: Tue Sep 22 21:24:18 2026 +0200 Ada: Fix spurious error on membership test in instance body The membership test is unreachable in the instance body. gcc/ada/ * sem_ch4.adb (Analyze_Membership_Op): Do not force an error to be given if the right operand is a Raise_Error node. Diff: --- gcc/ada/sem_ch4.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 31786fd6ab76..07bedd0fb761 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -3683,7 +3683,7 @@ package body Sem_Ch4 is Analyze (N); return; - else + elsif Nkind (R) not in N_Raise_xxx_Error then -- In all versions of the language, if we reach this point there -- is a previous error that will be diagnosed below.
