aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/inline.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-01-13 11:42:37 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2017-01-13 11:42:37 +0100
commit00f45f309076825e5bae672ffc2229fbe6ef8d88 (patch)
treeff983b37d2975254808502a007da8cc9fd9fb3e9 /gcc/ada/inline.adb
parenteaed322611b9c09a746f84e6280cdd400aaf9d60 (diff)
downloadgcc-00f45f309076825e5bae672ffc2229fbe6ef8d88.zip
gcc-00f45f309076825e5bae672ffc2229fbe6ef8d88.tar.gz
gcc-00f45f309076825e5bae672ffc2229fbe6ef8d88.tar.bz2
[multiple changes]
2017-01-13 Ed Schonberg <schonberg@adacore.com> * sem_util.ads, sem_util.adb (Choice_List): Move function here from sem_aggr.adb, for use elsewhere. * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List. * sem_aggr.adb (Resolve_Array_Aggregate): Remove Iterated_Component_Present. * exp_aggr.adb: Use Choice_List throughout, to handle Iterated_Component_Associations. (Gen_Loop): Generate proper loop for an Iterated_Component_Association: loop variable has the identifier of the original association. Generate a loop even for a single component choice, in order to make loop parameter visible in expression. (Flatten): An Iterated_Component_Association is not static. 2017-01-13 Yannick Moy <moy@adacore.com> * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of float exponentiation for statically known small negative values is the reciprocal of the exponentiation for the opposite value of the exponent. * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float): Ensure that the value of float exponentiation for negative values is the reciprocal of the exponentiation for the opposite value of the exponent. * inline.adb (Expand_Inlined_Call): Fix the count for the number of generated gotos. From-SVN: r244414
Diffstat (limited to 'gcc/ada/inline.adb')
-rw-r--r--gcc/ada/inline.adb6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index d0f8a8c..f07cc4a 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -2458,6 +2458,7 @@ package body Inline is
elsif Nkind (N) = N_Simple_Return_Statement then
if No (Expression (N)) then
+ Num_Ret := Num_Ret + 1;
Make_Exit_Label;
Rewrite (N,
Make_Goto_Statement (Loc, Name => New_Copy (Lab_Id)));
@@ -3396,8 +3397,9 @@ package body Inline is
elsif Present (Exit_Lab) then
- -- If the body was a single expression, the single return statement
- -- and the corresponding label are useless.
+ -- If there is a single return statement at the end of the
+ -- subprogram, the corresponding goto statement and the
+ -- corresponding label are useless.
if Num_Ret = 1
and then