From 2c40c60ecb32a2200c3a4087521b9f35cc08763e Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Mon, 16 Nov 2020 15:02:47 -0500 Subject: [PATCH] [Ada] Compiler crash on call to function instance gcc/ada/ * exp_ch6.adb (Is_Build_In_Place_Result_Type): Further narrow the conditions under which we enable build-in-place for controlled types. --- gcc/ada/exp_ch6.adb | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 98a1ceba8c2..955049f4210 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -8091,6 +8091,7 @@ package body Exp_Ch6 is if True then Result := Is_Controlled (T) + and then not Is_Generic_Actual_Type (T) and then Present (Enclosing_Subprogram (T)) and then not Is_Compilation_Unit (Enclosing_Subprogram (T)) and then Ekind (Enclosing_Subprogram (T)) = E_Procedure; -- 2.30.2