From d6a52e47ac1705bdf7c527005b42f3e8ba5da858 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 2 Nov 2020 10:17:02 +0100 Subject: [PATCH] [Ada] Reference before declaration on C392015 gcc/ada/ * exp_ch6.adb (Expand_Call): Properly split Transform_Function_Array and Modify_Tree_For_C. --- gcc/ada/exp_ch6.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 8ef178f..d986249 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -3656,7 +3656,8 @@ package body Exp_Ch6 is -- are passed by pointer in the generated C code, and we cannot -- take a pointer from a subprogram call. - elsif Nkind (Parent (Call_Node)) in N_Subprogram_Call + elsif Modify_Tree_For_C + and then Nkind (Parent (Call_Node)) in N_Subprogram_Call and then Is_Record_Type (Etype (Func_Id)) then declare -- 2.7.4