diff options
author | Bob Duff <duff@adacore.com> | 2020-06-24 16:26:50 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-10-16 03:31:33 -0400 |
commit | 7e1ccdbb5141e4dd2d4b0c4fdbba80dd5fa9cae4 (patch) | |
tree | d17cd6db0d891d736b3d88fbc0e0f70a289da550 /gcc | |
parent | cfe989ca49dab9a3fda9e5401a932db168848304 (diff) | |
download | gcc-7e1ccdbb5141e4dd2d4b0c4fdbba80dd5fa9cae4.zip gcc-7e1ccdbb5141e4dd2d4b0c4fdbba80dd5fa9cae4.tar.gz gcc-7e1ccdbb5141e4dd2d4b0c4fdbba80dd5fa9cae4.tar.bz2 |
[Ada] Remove obsolete workaround regarding array returns
gcc/ada/
* exp_ch6.adb (Expand_Simple_Function_Return): Remove obsolete
comment and code.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/exp_ch6.adb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 1059459..ab237f9 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -7545,16 +7545,9 @@ package body Exp_Ch6 is -- processing is required except to set the By_Ref flag to ensure -- that gigi does not attempt an extra unnecessary copy. (Actually -- not just unnecessary but wrong in the case of a controlled type, - -- where gigi does not know how to do a copy.) To make up for a gcc - -- 2.8.1 deficiency (???), we perform the copy for array types if the - -- constrained status of the target type is different from that of - -- the expression. + -- where gigi does not know how to do a copy.) if Requires_Transient_Scope (Exp_Typ) - and then - (not Is_Array_Type (Exp_Typ) - or else Is_Constrained (Exp_Typ) = Is_Constrained (R_Type) - or else CW_Or_Has_Controlled_Part (Utyp)) and then Exp_Is_Function_Call then Set_By_Ref (N); |