[Ada] Assert failure on b38105a in -gnat95 mode
authorArnaud Charlet <charlet@adacore.com>
Wed, 2 Dec 2020 11:55:42 +0000 (06:55 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 17 Dec 2020 10:49:20 +0000 (05:49 -0500)
gcc/ada/

* sem_util.adb (Inherit_Predicate_Flags): No-op before Ada 2012.

gcc/ada/sem_util.adb

index b849ef2..90e746f 100644 (file)
@@ -14625,7 +14625,9 @@ package body Sem_Util is
 
    procedure Inherit_Predicate_Flags (Subt, Par : Entity_Id) is
    begin
-      if Present (Predicate_Function (Subt)) then
+      if Ada_Version < Ada_2012
+        or else Present (Predicate_Function (Subt))
+      then
          return;
       end if;