From: Arnaud Charlet Date: Mon, 2 Nov 2020 09:17:02 +0000 (+0100) Subject: [Ada] Reference before declaration on C392015 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d6a52e47ac1705bdf7c527005b42f3e8ba5da858;p=gcc.git [Ada] Reference before declaration on C392015 gcc/ada/ * exp_ch6.adb (Expand_Call): Properly split Transform_Function_Array and Modify_Tree_For_C. --- diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 8ef178f433a..d98624956b8 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