public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Assert failure on b38105a in -gnat95 mode
@ 2020-12-17 10:50 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2020-12-17 10:50 UTC (permalink / raw)
  To: gcc-patches; +Cc: Arnaud Charlet

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

A cascaded error leads to some confusion in this case, fixed by making
Inherit_Predicate_Flags a no-op pre Ada 2012.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

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

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 423 bytes --]

diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -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;
 



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-17 10:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17 10:50 [Ada] Assert failure on b38105a in -gnat95 mode Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).