diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2023-06-17 23:46:54 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-06-27 14:05:51 +0200 |
commit | 3d3930f52aaeb53b9c6460459b8711fc527d6741 (patch) | |
tree | 85f35462ee9acbb600cd8476aaa5e825078cc5f6 /gcc/ada/debug.adb | |
parent | d47dbbd22fcb4fd26f7a9b66bd99dcf4518deea9 (diff) | |
download | gcc-3d3930f52aaeb53b9c6460459b8711fc527d6741.zip gcc-3d3930f52aaeb53b9c6460459b8711fc527d6741.tar.gz gcc-3d3930f52aaeb53b9c6460459b8711fc527d6741.tar.bz2 |
ada: Fix double finalization of case expression in concatenation
This streamlines the expansion of case expressions by not wrapping them in
an Expression_With_Actions node when the type is not by copy, which avoids
the creation of a temporary and the associated finalization issues.
That's the same strategy as the one used for the expansion of if expressions
when the type is by reference, unless Back_End_Handles_Limited_Types is set
to True. Given that it is never set to True, except by a debug switch, and
has never been implemented, this parameter is removed in the process.
gcc/ada/
* debug.adb (d.L): Remove documentation.
* exp_ch4.adb (Expand_N_Case_Expression): In the not-by-copy case,
do not wrap the case statement in an Expression_With_Actions node.
(Expand_N_If_Expression): Do not test
Back_End_Handles_Limited_Types
* gnat1drv.adb (Adjust_Global_Switches): Do not set it.
* opt.ads (Back_End_Handles_Limited_Types): Delete.
Diffstat (limited to 'gcc/ada/debug.adb')
-rw-r--r-- | gcc/ada/debug.adb | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb index fd94203..9c2a2b0 100644 --- a/gcc/ada/debug.adb +++ b/gcc/ada/debug.adb @@ -123,7 +123,6 @@ package body Debug is -- d.I Do not ignore enum representation clauses in CodePeer mode -- d.J Relaxed rules for pragma No_Return -- d.K Do not reject components in extensions overlapping with parent - -- d.L Depend on back end for limited types in if and case expressions -- d.M Relaxed RM semantics -- d.N Use rounding when converting from floating point to fixed point -- d.O Dump internal SCO tables @@ -898,11 +897,6 @@ package body Debug is -- clause but they cannot be fully supported by the GCC type system. -- This switch nevertheless allows them for the sake of compatibility. - -- d.L Normally the front end generates special expansion for conditional - -- expressions of a limited type. This debug flag removes this special - -- case expansion, leaving it up to the back end to handle conditional - -- expressions correctly. - -- d.M Relaxed RM semantics. This flag sets Opt.Relaxed_RM_Semantics -- See Opt.Relaxed_RM_Semantics for more details. |