From 6f238680dd3091f7431f3e1b571ea3c51f8ce2b4 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 25 Jun 2020 05:36:54 -0400 Subject: [PATCH] [Ada] Crash when specifying an abstract subprogram with Stream_Convert gcc/ada/ * sem_prag.adb (Check_OK_Stream_Convert_Function): Check for abstract subprograms. --- gcc/ada/sem_prag.adb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index b3fa7344dac..38761983508 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -23719,6 +23719,9 @@ package body Sem_Prag is Error_Pragma_Arg ("argument for pragma% must be function of one argument", Arg); + elsif Is_Abstract_Subprogram (Ent) then + Error_Pragma_Arg + ("argument for pragma% cannot be abstract", Arg); end if; end Check_OK_Stream_Convert_Function; -- 2.30.2