From: Tucker Taft Date: Sat, 4 Nov 2023 13:53:28 +0000 (+0000) Subject: ada: Fix predicate failure that occurred in a test case X-Git-Tag: basepoints/gcc-15~4236 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=834f2973606c63b4cd9e27e3bf24f01ee1347568;p=thirdparty%2Fgcc.git ada: Fix predicate failure that occurred in a test case The CodePeer test case illustrating a problem where a "high" precondition failure was expected, died in the GNAT FE on input_reading.adb. The problem was in Check_SCIL, where it didn't properly handle a discriminant_specification. gcc/ada/ * sem_scil.adb: Handle discriminant specification. --- diff --git a/gcc/ada/sem_scil.adb b/gcc/ada/sem_scil.adb index da8fab69a97e..d7679d8b50f9 100644 --- a/gcc/ada/sem_scil.adb +++ b/gcc/ada/sem_scil.adb @@ -91,6 +91,7 @@ package body Sem_SCIL is elsif Nkind (Ctrl_Tag) in N_Object_Renaming_Declaration | N_Object_Declaration | N_Parameter_Specification + | N_Discriminant_Specification then Ctrl_Typ := Etype (Defining_Identifier (Ctrl_Tag));