aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2020-11-02 10:17:02 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2020-11-27 04:16:01 -0500
commitd6a52e47ac1705bdf7c527005b42f3e8ba5da858 (patch)
tree9ebd7220000778668477ebfa5c768546a69109ac
parenta0f2ee7a7f99f35ef59e125ff046df84a711ebfb (diff)
downloadgcc-d6a52e47ac1705bdf7c527005b42f3e8ba5da858.zip
gcc-d6a52e47ac1705bdf7c527005b42f3e8ba5da858.tar.gz
gcc-d6a52e47ac1705bdf7c527005b42f3e8ba5da858.tar.bz2
[Ada] Reference before declaration on C392015
gcc/ada/ * exp_ch6.adb (Expand_Call): Properly split Transform_Function_Array and Modify_Tree_For_C.
-rw-r--r--gcc/ada/exp_ch6.adb3
1 files changed, 2 insertions, 1 deletions
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